Problem : no such file to load -- sqlite3


#1

i followed a tutorial/course and it didn’t work so i copied the source
files from it and it still doesn’t work
http://www.jhl.it/Courses/LUGPC10.html

MissingSourceFile in UsersController#index

no such file to load – sqlite3

RAILS_ROOT: C:/courses/LUGPC10/WebAlbum
Application Trace | Framework Trace | Full Trace

C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' vendor/rails/activesupport/lib/active_support/core_ext/kernel/ requires.rb:7:inrequire_library_or_gem’
vendor/rails/activesupport/lib/active_support/core_ext/kernel/
reporting.rb:11:in silence_warnings' vendor/rails/activesupport/lib/active_support/core_ext/kernel/ requires.rb:5:inrequire_library_or_gem’
vendor/rails/activerecord/lib/active_record/connection_adapters/
sqlite3_adapter.rb:10:in sqlite3_connection' vendor/rails/activerecord/lib/active_record/connection_adapters/ abstract/connection_specification.rb:291:insend’
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/connection_specification.rb:291:in connection=' vendor/rails/activerecord/lib/active_record/connection_adapters/ abstract/connection_specification.rb:259:inretrieve_connection’
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/connection_specification.rb:78:in connection' vendor/rails/activerecord/lib/active_record/query_cache.rb:8:incache’
vendor/rails/actionpack/lib/action_controller/caching.rb:677:in
perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:524:insend’
vendor/rails/actionpack/lib/action_controller/base.rb:524:in
process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:685:inprocess_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:
123:in process' vendor/rails/actionpack/lib/action_controller/base.rb:388:inprocess’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in
handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:indispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in
dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:indispatch’
vendor/rails/railties/lib/webrick_server.rb:112:in handle_dispatch' vendor/rails/railties/lib/webrick_server.rb:78:inservice’
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service' C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:95:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in each' C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:23:in start' C:/Ruby/lib/ruby/1.8/webrick/server.rb:82:instart’
vendor/rails/railties/lib/webrick_server.rb:62:in dispatch' vendor/rails/railties/lib/commands/servers/webrick.rb:66 C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' vendor/rails/activesupport/lib/active_support/dependencies.rb:496:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in
new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:496:inrequire’
vendor/rails/railties/lib/commands/server.rb:39
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' vendor/rails/activesupport/lib/active_support/dependencies.rb:342:innew_constants_in’
vendor/rails/activesupport/lib/active_support/dependencies.rb:496:in
require' vendor/rails/activesupport/lib/active_support/core_ext/kernel/ requires.rb:7:inrequire_library_or_gem’
vendor/rails/activesupport/lib/active_support/core_ext/kernel/
reporting.rb:11:in silence_warnings' vendor/rails/activesupport/lib/active_support/core_ext/kernel/ requires.rb:5:inrequire_library_or_gem’
vendor/rails/activerecord/lib/active_record/connection_adapters/
sqlite3_adapter.rb:10:in sqlite3_connection' vendor/rails/activerecord/lib/active_record/connection_adapters/ abstract/connection_specification.rb:291:insend’
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/connection_specification.rb:291:in connection=' vendor/rails/activerecord/lib/active_record/connection_adapters/ abstract/connection_specification.rb:259:inretrieve_connection’
vendor/rails/activerecord/lib/active_record/connection_adapters/
abstract/connection_specification.rb:78:in connection' vendor/rails/activerecord/lib/active_record/query_cache.rb:8:incache’
vendor/rails/actionpack/lib/action_controller/caching.rb:677:in
perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:524:insend’
vendor/rails/actionpack/lib/action_controller/base.rb:524:in
process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:685:inprocess_without_session_management_support’
vendor/rails/actionpack/lib/action_controller/session_management.rb:
123:in process' vendor/rails/actionpack/lib/action_controller/base.rb:388:inprocess’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:171:in
handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:115:indispatch’
vendor/rails/actionpack/lib/action_controller/dispatcher.rb:126:in
dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:9:indispatch’
vendor/rails/railties/lib/webrick_server.rb:112:in handle_dispatch' vendor/rails/railties/lib/webrick_server.rb:78:inservice’
C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service' C:/Ruby/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' C:/Ruby/lib/ruby/1.8/webrick/server.rb:95:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:in each' C:/Ruby/lib/ruby/1.8/webrick/server.rb:92:instart’
C:/Ruby/lib/ruby/1.8/webrick/server.rb:23:in start' C:/Ruby/lib/ruby/1.8/webrick/server.rb:82:instart’
vendor/rails/railties/lib/webrick_server.rb:62:in dispatch' vendor/rails/railties/lib/commands/servers/webrick.rb:66 C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' vendor/rails/activesupport/lib/active_support/dependencies.rb:496:inrequire’
vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in
new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:496:inrequire’
vendor/rails/railties/lib/commands/server.rb:39
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

This error occurred while loading the following files:
sqlite3

Request

Parameters:

None

Show session dump


flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{“cookie”=>[],
“Cache-Control”=>“no-cache”}


#2

Your tutorial is looking to use sqlite3 as the database for it’s
application - if you check the file config/database.yml you will see
some words to the effect.

Check this site for details how if you can’t find instructions with
the tutorial itself.

http://accidentaltechnologist.com/ruby/ruby-on-rails/setting-up-sqlite3-for-ruby-on-rails-development/

Rick