Posts Tagged ‘netbeans’

Setting Up Netbeans and Ruby

Saturday, November 14th, 2009

I’ve been considering some development with Ruby and Rails. As I’ve used the Netbeans IDE before and liked it, I downloaded the Ruby version to give it a try.

The main benefit here is that you can do a lot of things without the console. I can add models, scaffolds, migrate databases, and such with a few clicks.

The current default install doesn’t have the most current version of “JRuby” (that being ruby created with 100% Java) installed, so I opted to figure out how to update Netbeans with the most current interpreter.

Here is a quick list of things to do:
download the Ruby Netbeans IDE

Download latest version of JRuby

Install the new version to:
C:\Program Files\NetBeans 6.7.1\ruby2\
Depending on your install directory of Netbeans.

A directory will be created: jruby-1.4.0
Depending on the currently available version of JRuby.

In Netbeans, go to the platform manager in the menu “tools >> Ruby Platforms”: Select auto-detect platforms, or add a platform and browse to:
C:\Program Files\NetBeans 6.7.1\ruby2\jruby-1.4.0\bin\jruby.exe
This links the newly installed one with the IDE.

When creating your first project, one of the wizard steps will have a “install rails” button, click that and allow it to download and install rails for the new version of JRuby you just added. Currently that would be version 2.3.4.

Install the “activerecord-jdbcsqlite3-adapter” ruby gem through the menu item “tools >> ruby gems” if you are interested in using the sqlite database engine.
(in your database.yml file make development and test use… adapter: jdbcsqlite3 instead of sqlite3)

Change the server used to Webrick when creating a project, in one of the wizard steps (much much faster than that glassfish one) .

That’s about it to get started. I’ve started playing around with creating models and scaffolding, but I have yet to do anything worth while. I think I need to read up on the Ruby language itself to get the basic syntax down.

Edit:
I started reading and tinkering with some code for a few days.
I’m not too impressed with Ruby/Ruby on rails so far. It doesn’t seem any easier than any other language to use. It seems more like jumping through predefined hoops to get anywhere. It has some great ideas in it like parts of the data model and the ruby syntax itself. I might give it a try again sometime, but for now it is likely I will try a PHP/framework combo instead.

PHP, IIS, and NetBeans

Tuesday, March 10th, 2009

It’s been while since I have used the language, so I thought it would be fun to try making a few new ideas with it.

I did a quick search to see what PHP IDEs were available.  I’ve used Eclipse quite a lot, but I’m not particularly fond of it, so I wanted to try something else.

I plan on giving NetBeans a chance to see how it fairs.
http://www.netbeans.org/features/php/

Seeing as I am currently using Vista Ultimate 64-bit, I decided to just use IIS. I had a few quips getting it working.

I had modified IIS beforehand when I was doing some old VbScript coding, so needless to say when I tried installing PHP it didn’t work out of the box.

In the IIS configuration program (use the start button search in vista on “InetMgr”):
- Install PHP as a ISAPI filter.
- In your selected application pool advances settings, make sure that “Managed Pipeline Mode” is set to “Classic” mode.
In the list of global settings:
- Add a default document “index.php”
- In ISAPI Filters, add a new filter that points to (most likely) “C:\Program Files (x86)\PHP\php5isapi.dll”
- In Handler Mappings, add a PHP entry “*.php” that also points to “C:\Program Files (x86)\PHP\php5isapi.dll”
- In that same screen look over to the right for “View Ordered List…” to make sure that the PHP entry is at the top so it gets priority over the static page handler.

What I also did was have my IIS Site point directly to the default NetBeans project directory. The issue I had there was file permissions. I changed the “Basic Settings…” option to connect as my personal login. Seeing as this is only for development, I don’t see any issues with that. I also changed my default binding to “127.0.0.1,” which should only allow access from the computer itself. Not that it matters as this computer is behind a router





 

 
Stock Photo Website
Tech Learning Site

Popular Article Tags

Recent Article Comments

Archives