Problem with rails

A

Andre Nathan

Hi

I've just decided to try rails today. I'm following the tutorial, but in
step six, when I try to access http://localhost/friends/display, I'm
getting the following error in development.log:


Processing FriendsController#display (for ::1 at Fri Nov 26 14:09:25 BRST 2004)
Parameters: {"action"=>"display", "controller"=>"friends"}

ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
/usr/pkg//lib/ruby/gems/1.8/gems/activerecord-1.1.0.200411231446/lib/active_record/connection_adapters/abstract_adapter.rb:111:in `retrieve_connection'
/usr/pkg//lib/ruby/gems/1.8/gems/activerecord-1.1.0.200411231446/lib/active_record/base.rb:172:in `connection'
/usr/pkg//lib/ruby/gems/1.8/gems/activerecord-1.1.0.200411231446/lib/active_record/base.rb:251:in `find'
/usr/pkg/share/httpd/htdocs/testrails/app/controllers/friends_controller.rb:9:in `display'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:588:in `send'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:588:in `perform_action_without_filters'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/filters.rb:236:in `perform_action_without_benchmark'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/benchmarking.rb:30:in `measure'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/rescue.rb:68:in `perform_action'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:272:in `process'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:245:in `process'
/usr/pkg//lib/ruby/gems/1.8/gems/rails-0.8.5.200411252307/lib/dispatcher.rb:41:in `dispatch'
/usr/pkg/share/httpd/htdocs/testrails/public/dispatch.cgi:10

Rendering /usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error)


Any ideas on what could be causing this? As the logs indicate, I'm
running the "beta" gems from gems.rubyonrails.org.

$ ruby -v
ruby 1.8.2 (2004-11-06) [i386-netbsdelf2.0.]

Please tell me is there's any other information I can provide.

Best regards,
Andre
 
T

Tobias Luetke

The current edge gems are missing a connection_establish call.

For now just add
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) to the end
of your config/environment.rb


Hi

I've just decided to try rails today. I'm following the tutorial, but in
step six, when I try to access http://localhost/friends/display, I'm
getting the following error in development.log:

Processing FriendsController#display (for ::1 at Fri Nov 26 14:09:25 BRST 2004)
Parameters: {"action"=>"display", "controller"=>"friends"}

ActiveRecord::ConnectionNotEstablished (ActiveRecord::ConnectionNotEstablished):
/usr/pkg//lib/ruby/gems/1.8/gems/activerecord-1.1.0.200411231446/lib/active_record/connection_adapters/abstract_adapter.rb:111:in `retrieve_connection'
/usr/pkg//lib/ruby/gems/1.8/gems/activerecord-1.1.0.200411231446/lib/active_record/base.rb:172:in `connection'
/usr/pkg//lib/ruby/gems/1.8/gems/activerecord-1.1.0.200411231446/lib/active_record/base.rb:251:in `find'
/usr/pkg/share/httpd/htdocs/testrails/app/controllers/friends_controller.rb:9:in `display'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:588:in `send'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:588:in `perform_action_without_filters'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/filters.rb:236:in `perform_action_without_benchmark'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/benchmarking.rb:30:in `measure'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/benchmarking.rb:30:in `perform_action_without_rescue'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/rescue.rb:68:in `perform_action'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:272:in `process'
/usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/base.rb:245:in `process'
/usr/pkg//lib/ruby/gems/1.8/gems/rails-0.8.5.200411252307/lib/dispatcher.rb:41:in `dispatch'
/usr/pkg/share/httpd/htdocs/testrails/public/dispatch.cgi:10

Rendering /usr/pkg//lib/ruby/gems/1.8/gems/actionpack-0.9.5.200411260317/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error)

Any ideas on what could be causing this? As the logs indicate, I'm
running the "beta" gems from gems.rubyonrails.org.

$ ruby -v
ruby 1.8.2 (2004-11-06) [i386-netbsdelf2.0.]

Please tell me is there's any other information I can provide.

Best regards,
Andre
 
A

Andre Nathan

The current edge gems are missing a connection_establish call.

For now just add
ActiveRecord::Base.establish_connection(RAILS_ENV.to_sym) to the end
of your config/environment.rb

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top