Topic: Webrick keeps crashing

Well i just installed ruby on rails and all seems to work independently but somehow they are not coordinating with each other i guess.

When i place a hello.rhtml template in the views folder and call http://localhost:3000/salutation/hello  , Following messages occurs :


We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.


I dont know what is causing this problem. I rechecked the codes that i did. but all is perfect.. what am i missing here. please kindly advice .

Detail :

OS : Fedora 14
Ruby :ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]
Rails :Rails 2.3.8
MySQL :mysql  Ver 14.14 Distrib 5.1.51, for redhat-linux-gnu (x86_64) using readline 5.1



Thank You
Sanjiv

Re: Webrick keeps crashing

Check your log file for more details or post it here, please.

Re: Webrick keeps crashing

following is the log: Please note that i have already installed mysql and it works when i start/restart....but looks as if it  is recognizes only sqlite

/!\ FAILSAFE /!\  Thu Mar 24 20:15:07 +0545 2011
  Status: 500 Internal Server Error
  no such file to load -- sqlite3
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in `sqlite3_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
    /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
    /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'




Thank You
Sanjiv

Re: Webrick keeps crashing

What did you put in your database.yml file? Which adapter do you indicate in DEV or PROD mode?By default Rails uses sqlite DB, so if you didn't specify the database to use when creating the Rails application (like rails new myapp -d 'yourdbadapter', Rails will use sqlite and put its adapter in the database.yml file). In your case when you'are on Rails 2.3.8, you will just have to modify the adapter in that file and put mysql instead sqlite. Then run

rake db:create
rake db:migrate #if you already have some migrations in place

Last edited by Javix (2011-03-28 03:35:11)

Re: Webrick keeps crashing

Thank You very much Javix....it worked..