small medium large xlarge

Generic-user-small
08 Sep 2009, 18:17
Dave Patterson (2 posts)

I’m starting to work through the book using Netbeans 6.7.1 as my IDE. (I know, but I want to learn the IDE also.) I have created these files:

E:\NetBeansWorkspace\Demo\app\controllers\say_controller.rb E:\NetBeansWorkspace\Demo\app\views\say\hello.html.erb

as specified in the book through page 50. Webrick comes up at http://localhost:3000/ when I run the Demo project in Netbeans, but I get “Unable to connect” when I go to http://localhost:3000/say and a 500 error when I go to http://localhost:3000/say/hello.

I’m using: Rails 2.3.2 JRuby 1.8.6 Java jdk1.6.0_07 MySQL 5.1 (not using yet for this) Netbeans 6.7.1 Firefox 3.5.2 XP SP3

Any ideas would be greatly appreciated.

Thanks, Dave

Generic-user-small
09 Sep 2009, 07:23
Dave Patterson (2 posts)

Chris Kutler in the Ruby Users Netbeans Forum (http://forums.netbeans.org/viewforum.php?f=4) pointed out that I am using Rails 2.3.2 and the book is tested against 2.2.2 and that the first Say Hello example doesn’t use a database, which was the problem. Uncommenting this line in config/environment.rb and restarting the server let it run:

config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

Apparently now one must tell Rails which framework parts are not going to be used.

You must be logged in to comment