Hi,
I am trying to create the sample application as mentioned at the
following link:
But the example doesnt seem to work.
I am following the exact steps as mentioned on the above page and type
the following at the command line(as mentioned in the example)
ruby script\generate controller MyTest
Then after doing this I go to the browser and type the following in the
address window:
http://127.0.0.1:3000/MyTest/
But the response that I get is:
“We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it
shortly.”
Plz note that when i do “http://127.0.0.1:3000/ ” a web page is opening
correctly. but not when i do “http://127.0.0.1:3000/MyTest/ ”
What could be the possible reason and whats the fix. I am a beginner and
started learning RoR today itself with this first example.
Any help will be greatly appreciated.
Thanks & Regards,
Kamal
On May 9, 9:28 pm, Kamal N. [email protected]
wrote:
Then after doing this I go to the browser and type the following in the
address window:http://127.0.0.1:3000/MyTest/
These days you would need to go to http://127.0.0.1:3000/my_test
You’re following a tutorial that is over 4 years old. A lot has
changed. A good starting place would be the guides on
Ruby on Rails Guides
Fred
what is the output on the console?
Frederick C. wrote:
On May 9, 9:28�pm, Kamal N. [email protected]
wrote:
Then after doing this I go to the browser and type the following in the
address window:http://127.0.0.1:3000/MyTest/
These days you would need to go to http://127.0.0.1:3000/my_test
You’re following a tutorial that is over 4 years old. A lot has
changed. A good starting place would be the guides on
guides.rubyonrails.org
Fred
Fred,
I tried with “ttp://127.0.0.1:3000/my_test” as well but it doesnt make
any difference. Is there any other fix/cause of this problem.
I will follow the new tutorials that you have suggested.
Thanks for your suggestion and response.
Regards,
Kamal
[email protected] wrote:
what is the output on the console?
Hi icemag,
The output is the following in the browser window:
"We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it
shortly."
Any pointers.
Thanks & Regards,
Kamal
Kamal N. wrote:
[email protected] wrote:
what is the output on the console?
Hi icemag,
The output is the following in the browser window:
"We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it
shortly."
Any pointers.
Thanks & Regards,
Kamal
Icemag,
I am sorry, you asked for output on console and not in the browser.
Infact when I do “http://127.0.0.1:3000/my_test ”, i dont see any output
on the console. But when i refresh the page in the browser once again I
see the following output(repeated twice, probably for the prev trial
too) on the console(where the server is running):
C:\ruby\cookbook>ruby script\server
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2009-05-09 23:24:45] INFO WEBrick 1.3.1
[2009-05-09 23:24:45] INFO ruby 1.8.6 (2007-09-24) [i386-mswin32]
[2009-05-09 23:24:45] INFO WEBrick::HTTPServer#start: pid=3976
port=3000
/!\ FAILSAFE /!\ Sat May 09 23:25:01 -0700 2009
Status: 500 Internal Server Error
no such file to load – sqlite3
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_origina l_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/depend
encies.rb:156:in require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/depend encies.rb:521:in
new_constants_in’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/depend
encies.rb:156:in require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_e xt/kernel/requires.rb:7:in
require_library_or_gem’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_e
xt/kernel/reporting.rb:11:in silence_warnings' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_e xt/kernel/requires.rb:5:in
require_library_or_gem’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/sqlite3_adapter.rb:10:in sqlite3_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:223:in
send’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:223:in new_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:245:in
checkout_new_connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:188:in checkout' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:184:in
loop’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:184:in checkout' c:/ruby/lib/ruby/1.8/monitor.rb:242:in
synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:183:in checkout' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:98:in
connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:326:in retrieve_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_specification.rb:123:in
retrieve_connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_specification.rb:115:in connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_ca che.rb:9:in
cache’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_ca
che.rb:28:in call' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:361:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/head.rb:9:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/methodoverride.rb:24:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params
_parser.rb:15:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewind able_input.rb:25:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/sessio
n/cookie_store.rb:93:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/reload er.rb:9:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsa
fe.rb:11:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/lock.rb:11:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/lock.rb:11:in synchronize' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/lock.rb:11:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispat
cher.rb:106:in call' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/static.rb:31:in
c
all’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/urlmap.rb:46:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/urlmap.rb:40:in
each’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/urlmap.rb:40:in call' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/log_tailer.rb:17:i n
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/content_length.rb:13:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/handler/webrick.rb:46:in
service’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in
run’
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in each' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in
start’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/handler/webrick.rb:13:in run' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_origina
l_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' script/server:3 /!\ FAILSAFE /!\ Sat May 09 23:25:19 -0700 2009 Status: 500 Internal Server Error no such file to load -- sqlite3 c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_origina
l_require’
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/depend encies.rb:156:in
require’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/depend
encies.rb:521:in new_constants_in' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/depend encies.rb:156:in
require’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_e
xt/kernel/requires.rb:7:in require_library_or_gem' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_e xt/kernel/reporting.rb:11:in
silence_warnings’
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/core_e
xt/kernel/requires.rb:5:in require_library_or_gem' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/sqlite3_adapter.rb:10:in
sqlite3_connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:223:in send' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:223:in
new_connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:245:in checkout_new_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:188:in
checkout’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:184:in loop' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:184:in
checkout’
c:/ruby/lib/ruby/1.8/monitor.rb:242:in synchronize' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:183:in
checkout’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:98:in connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_pool.rb:326:in
retrieve_connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_specification.rb:123:in
retrieve_connection' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti on_adapters/abstract/connection_specification.rb:115:in
connection’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_ca
che.rb:9:in cache' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/query_ca che.rb:28:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connecti
on_adapters/abstract/connection_pool.rb:361:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/head.rb:9:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/methodoverride.rb:24:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params _parser.rb:15:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewind
able_input.rb:25:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/sessio n/cookie_store.rb:93:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/reload
er.rb:9:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsa fe.rb:11:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/lock.rb:11:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/lock.rb:11:in
synchronize’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/lock.rb:11:in call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispat cher.rb:106:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/static.rb:31:in
c all' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/urlmap.rb:46:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/urlmap.rb:40:in each' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/urlmap.rb:40:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/log_tailer.rb:17:i
n call' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/content_length.rb:13:in
call’
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor
/rack-1.0/rack/handler/webrick.rb:46:in service' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in
service’
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in run' c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in
start_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in
start_thread’
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in
each’
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in start' c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in
start’
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in start' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/vendor /rack-1.0/rack/handler/webrick.rb:13:in
run’
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:111
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_origina l_require' c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require’
script/server:3
Bjørn Arild Mæland wrote:
on the console. But when i refresh the page in the browser once again I
[2009-05-09 23:24:45] INFO �ruby 1.8.6 (2007-09-24) [i386-mswin32]
[2009-05-09 23:24:45] INFO �WEBrick::HTTPServer#start: pid=3976
port=3000
/!\ FAILSAFE /!\ �Sat May 09 23:25:01 -0700 2009
� Status: 500 Internal Server Error
� no such file to load – sqlite3
You’re missing the sqlite3 gem. Try ‘gem install sqlite3’.
However, as Frederick C. pointed out, you’re following a very old
tutorial. I’d suggest checking out
rails.info
Good luck!
Thanks Bjørn Arild Mæland…
It worked.
Yes…I have started with
“rails.info ” itself as suggested by
Fred and you…
on the console. But when i refresh the page in the browser once again I
[2009-05-09 23:24:45] INFO ruby 1.8.6 (2007-09-24) [i386-mswin32]
[2009-05-09 23:24:45] INFO WEBrick::HTTPServer#start: pid=3976
port=3000
/!\ FAILSAFE /!\ Sat May 09 23:25:01 -0700 2009
Status: 500 Internal Server Error
no such file to load – sqlite3
You’re missing the sqlite3 gem. Try ‘gem install sqlite3’.
However, as Frederick C. pointed out, you’re following a very old
tutorial. I’d suggest checking out
Ruby on Rails,Rails Tutorial,Ruby Basics,Rails 4,Bar Rails,Rail
Good luck!