Hi,
I create my rails application called ‘demo’, then run ‘script/server’.
Browse URL: http://localhost:3000/. It displayes default page ‘Welcome
aboard’ page.
Then run ‘ruby script/generate controller Say’ command
Following massages will displayed on screen :
exists app/controllers/
exists app/helpers/
create app/views/say
exists test/functional/
create app/controllers/say_controller.rb
create test/functional/say_controller_test.rb
create app/helpers/say_helper.rb
After that I edit ‘say_controller.rb’ in app/controllers as
class SayController < ApplicationController
def hello
end
end
Then create ‘hello.rhtml’ file in app/views folder
hello.rhtml
Hello, Rails!
Hello from Rails!
When I browse URL: http://localhost:3000/say/hello
It Gives an following massage.
We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it
shortly.
What to do??? Is i missing any configuration?
Please help me out.
Thanks and Regards,
Sachin Khot
Hello,
Please check your project_name/log/developmet.log to find something went
wrong.
Did you install database engine for rails?
Try to install database engine & try again.
http://www.mysql.org
http://www.sqlite.org/
Regards,
Hank Wang
Han-hong Wang wrote:
Hello,
Please check your project_name/log/developmet.log to find something went
wrong.
Did you install database engine for rails?
Try to install database engine & try again.
http://www.mysql.org
http://www.sqlite.org/
Regards,
Hank Wang
i have the same error and i already installed mysql database
but there is that error “Unused local variable load_error” in
config/boot.rb
in the line
rescue Gem::LoadError => load_error
$stderr.puts %(Missing the Rails #{version} gem. Please gem install -v=#{version} rails
, update your RAILS_GEM_VERSION setting in
config/environment.rb for the Rails version you do have installed, or
comment out RAILS_GEM_VERSION to use the latest version installed.)
exit 1
end
try renaming hello.rhtml to hello.html.erb
Milan D.
www.milandobrota.com
Sorry for bumping this topic, but there are a number of links on the
Internet (e.g. StackOverflow) which point to this topic, so I’d like to
add something in order to make it more useful for people who found this
topic through searches.
Whenever you get an unexpected error, the first thing you should do is
to read the log files. There are two log files that are important to
you:
-
The web server error log, typically /var/log/apache/error.log or
/var/log/nginx/error.log. This
log file contains:
- Phusion Passenger error messages.
- Everything that the Rails application writes to STDERR. This
typically consists of errors that Rails encounters during startup (but
not errors that it encounters when it’s handling requests).
-
The Rails development log (or production log, in case you’re running
in production), log/development.log
(or log/production.log
). When an
error occurs during request handling, it is typically logged here. This
file does not contain errors that Rails encounters during startup.
The error messages will often tell you what the problem is and how to
solve it.
More information can be found in the Troubleshooting section of the
Passenger manual: