Hi There,
I am a complete newbie - just doing the training at Lynda.com. I’m
having a problem with one of the first exercises.
I’ve installed Ruby, Rails, Ruby Gems, etc. I’m using webrick as my
local webserver. I’m running an exercise where I have a controller
called say_controller with the following content:
class SayController < ApplicationController
def hello
end
end
I have a say folder in views and inside is a file called hello.rhtml
containing the following text:
Hello World!
In my browser I ttype: http://localhost:3000/say/hello
and I’m expecting to see a screen saying “Hello World”
But instead I’m getting an error message:
MissingSourceFile in SayController#hello
no such file to load – sqlite3
RAILS_ROOT: /Users/daniel/Sites/my_app
Application Trace | Framework Trace | Full Trace
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:in
new_constants_in’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/requires.rb:7:in
require_library_or_gem’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/requires.rb:5:in
require_library_or_gem’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/sqlite3_adapter.rb:10:in sqlite3_connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in
send’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
connection=' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:in
retrieve_connection’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:in
cache’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:in
send’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:685:in
process_without_session_management_support’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:388:in
process’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:115:in
dispatch’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:126:in dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:9:in
dispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 78:in
service’
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in
run’
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in
start’
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
62:in dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ webrick.rb:66 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in
require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in
require’
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
script/server:3
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:342:in
new_constants_in’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:496:in require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/requires.rb:7:in
require_library_or_gem’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/core_ext/kernel/reporting.rb:11:in silence_warnings' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/requires.rb:5:in
require_library_or_gem’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/sqlite3_adapter.rb:10:in sqlite3_connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:in
send’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
connection=' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:in
retrieve_connection’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
connection' /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:in
cache’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/caching.rb:677:in perform_action' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:524:in
send’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/base.rb:524:in process_without_filters' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/filters.rb:685:in
process_without_session_management_support’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/session_management.rb:123:in process' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/base.rb:388:in
process’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:171:in handle_request' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:115:in
dispatch’
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/
action_controller/dispatcher.rb:126:in dispatch_cgi' /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/ action_controller/dispatcher.rb:9:in
dispatch’
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in handle_dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb: 78:in
service’
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in
run’
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:162:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/local/lib/ruby/1.8/webrick/server.rb:95:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/local/lib/ruby/1.8/webrick/server.rb:92:in
start’
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/local/lib/ruby/1.8/webrick/server.rb:82:in
start’
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
62:in dispatch' /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ webrick.rb:66 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require’
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in
require’
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/
active_support/dependencies.rb:342:in new_constants_in' /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in
require’
/usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:
39
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: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”=>[],
“Cache-Control”=>“no-cache”}
Can anyone give me some clues what to do to solve?
Thanks … tc