views:

222

answers:

1

Hi

I'm trying to access my web app built with rails. But when I type the URL I get: 500 Internal Server Error

If you are the administrator of this website, then please read this web application's log file to find out what went wrong.

And in the log there's:

/!\ FAILSAFE /!\  Mon Nov 23 10:56:03 -0500 2009
Status: 500 Internal Server Error
no such file to load -- sqlite3
/opt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/opt/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require'
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem'
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
/opt/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in `sqlite3_connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
/opt/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
/opt/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/opt/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/vendor/rack-1.0.0-git/lib/rack/lock.rb:11:in `call'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/vendor/rack-1.0.0-git/lib/rack/lock.rb:11:in `synchronize'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/vendor/rack-1.0.0-git/lib/rack/lock.rb:11:in `call'
/opt/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:106:in `call'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/rack/request_handler.rb:95:in `process_request'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/railz/application_spawner.rb:374:in `start_request_handler'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/railz/application_spawner.rb:332:in `handle_spawn_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/utils.rb:184:in `safe_fork'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/railz/application_spawner.rb:330:in `handle_spawn_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:163:in `start'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/opt/ruby/lib/ruby/gems/1.8/gems/passenger-2.2.7/bin/passenger-spawn-server:61

I tried gem install sqlite3-ruby, apt-get install a lot of ruby sqlite3 packages too but it does not work at all always the same error.

What would be wrong?

Thanks!

+1  A: 

Looks like your trying to replace the standard Ruby/Rubygems distribution with Enterprise Ruby. Passenger suggests this. However what the documentation doesn't mention is that your currently installed gems will not be accessible.

apt-get and a basic installation of gem augment the system version of Ruby. Usually located at /usr/lib/ruby.

The solution is to provide --install-dir option to gem pointing to your Enterprise Ruby installation. Something like this:

$ gem install sqlite3-ruby --install-dir /opt/ruby/lib/ruby/gems/1.8

However the version of gem that comes packaged with Enterprise Ruby does this automatically. so this should also do the trick.

$ /opt/ruby/bin/gem install sqlite3-ruby

N.B.: You're going to need to install all the other gems your application requires this way too.

EmFi