small medium large xlarge

Generic-user-small
05 Jun 2008, 21:37
Maxime HELFER (3 posts)

Good evening, I’m using Rails 2.0.2. I tried to make the first example work well but I always the same error message : MissingSourceFile in SayController#hello no such file to load – sqlite3.

I’ve just bought the new book about agile web development with rails and the exemple is exactly the same and it doesn’t work.

Many thanks

Samr_small_pragsmall
06 Jun 2008, 00:06
Sam Ruby (634 posts)

You will need a database. This is covered in chapter 3.

“sqlite3”:http://www.sqlite.org/download.html s the default database for Rails, starting with version 2.0.2. You will also need to install the Ruby interface to sqlite3, which typically can be done with the command

gem update sqlite3-ruby

If you have problems installing these, don’t hesitate to ask. But please do let us know what operating system you are using.

Generic-user-small
12 Jun 2008, 04:20
Trevor Turk (4 posts)

Just a note: it would be “gem install sqlite3-ruby” if you haven’t installed it before.

Generic-user-small
27 Jun 2008, 00:35
Stephen Sweeney (1 post)

I’m having this issue too, but running the gem install/update sqlite3-ruby did not fix the problem. I am running OS X 10.5 with a fresh compile of ruby 1.8.7 and rubygems 1.2.0. In fact, the database.yml file says 10.5 doesn’t need to do this.

Generic-user-small
08 Jul 2008, 03:06
Matt Cushing (5 posts)

I had the same error that Maxime had, and when I did the gem install sqlite3-ruby, it updated something, but I’m now getting:

MissingSourceFile in SayController#hello

no such file to load – sqlite3/database RAILS_ROOT: /Users/m2/work/demo

Application Trace | Framework Trace | Full Trace This error occurred while loading the following files: sqlite3 sqlite3/database

same as before except now the sqlite3/database is down at the bottom where it wasn’t before.

I’m running on a mac 10.4.11 Tiger OS. I did everything the hivelogic article said. My install works fine at localhost:3000, but localhost:3000/say/hello gives me the error.

Generic-user-small
27 Dec 2008, 13:59
kim.youngMok (3 posts)

i got the solution. (sorry for my poor english..)

although we wanted to make simple application( view, controller, except model ) like a “Hello, Rails!”, we cannot do it without any database setting.

so, if you want to make it , you should turn off “active_record”. => open ‘/config/environment.rb' => remove annotation at line 21. 'config.frameworks -= [ :active_record, :active_resource, :action_mailer ]' => restart your server.

then, you will see “Hello from Rails!” but, you can see it “Hello, Rails!” too in <head> tag. so, i removed the <html>,<head>, and <body> tag. just remained h1 tag.

Generic-user-small
01 Jan 2009, 16:16
Debasis Goswami (2 posts)

Hello Folks,

I am new to Ruby and now lost. The advices above has not worked for me. I get the error posted below. Additionally the line suggested by Kim is already commented out for me with a “#” at the beginning of the line. Any other idea?


MissingSourceFile in SayController#hello

no such file to load – sqlite3

RAILS_ROOT: C:/InstantRails/rails_apps/demo Application Trace | Framework Trace | Full Trace

C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in new_constants_in’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb:7:in require_library_or_gem’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb:5:in require_library_or_gem’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in sqlite3_connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in send’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in new_connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in checkout_new_connection’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in checkout' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in loop’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in checkout' C:/InstantRails/ruby/lib/ruby/1.8/monitor.rb:238:in synchronize’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in checkout' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in connection’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in retrieve_connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in retrieve_connection’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in cache’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in perform_action' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in send’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in process_without_filters' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in process_without_session_management_support’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in process' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in process’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in handle_request' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in dispatch_unlocked’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in synchronize’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in dispatch_cgi’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:103:in handle_dispatch’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:74:in service' C:/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:92:in each’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:23:in start’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in dispatch’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick.rb:66 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in new_constants_in’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require’ C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’ script/server:3

C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in new_constants_in’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb:7:in require_library_or_gem’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb:5:in require_library_or_gem’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in sqlite3_connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in send’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in new_connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in checkout_new_connection’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in checkout' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in loop’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in checkout' C:/InstantRails/ruby/lib/ruby/1.8/monitor.rb:238:in synchronize’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in checkout' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in connection’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in retrieve_connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in retrieve_connection’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in connection' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/query_cache.rb:8:in cache’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/caching/sql_cache.rb:12:in perform_action' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in send’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:524:in process_without_filters' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in process_without_session_management_support’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in process' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in process’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in handle_request' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in dispatch_unlocked’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in synchronize’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in dispatch_cgi’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in dispatch' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:103:in handle_dispatch’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:74:in service' C:/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:92:in each’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:23:in start’ C:/InstantRails/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:60:in dispatch’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/webrick.rb:66 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in new_constants_in’ C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in require' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require’ C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’ 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”=>[], “Content-Type”=>””, “Cache-Control”=>”no-cache”} ——————————————————-

Thanks, Debasis

Generic-user-small
01 Jan 2009, 19:17
Debasis Goswami (2 posts)

Some more information. I gave up on command line and used Aptana. I got a different error: http://127.0.0.1:3000/say/hello Routing Error No route matches “/say/hello” with {:method=>:get}

You must be logged in to comment