Using Netbeans 6.7.1,
Rails Gem Version 2.3.2
MySQL Server 5.1
I am currently doing the depot application from the pragmatic programmer
book (agile web development with rails) everything has been fine up
until
the point of creating sessions. I know they are using an earlier version
of
Ruby and the gems version is 2.2.2. As soon as I put the necessary code
in
the website no longer works and I get the following error in WEBrick:
=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3001
JRuby limited openssl loaded. gem install jruby-openssl for full
support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
I:/Program Files/NetBeans
6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84
warning: given block not used
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010-01-09 17:52:22] INFO WEBrick 1.3.1
[2010-01-09 17:52:22] INFO ruby 1.8.6 (2009-07-23) [java]
[2010-01-09 17:52:22] INFO WEBrick::HTTPServer#start: pid=8420
port=3001
I have made sure I am using the updated (2.3 Ruby on Rails)
ActionController’s in the session_store.rb so I can only assume it is a
problem with something else, which i have no idea about!
When i run the application I cannot access any of the pages (store,
products…etc) I get an error page saying “Sorry there is a problem
with
this page” come up.
If i remove the code from sessions_store and remove the DB creation the
site
begins to work again.
When i run the application I cannot access any of the pages (store,
products…etc) I get an error page saying “Sorry there is a problem with
this page” come up.
If i remove the code from sessions_store and remove the DB creation the site
begins to work again.
Not sure what “remove the DB creation” means, but –
Instead of making random changes, you should look at the error(s)
in your logs; post the stack trace here if you have questions about it.
When i run the application I cannot access any of the pages (store,
products…etc) I get an error page saying “Sorry there is a problem with
this page” come up.
If i remove the code from sessions_store and remove the DB creation the site
begins to work again.
What’s in the log file? Perhaps there’s a clue there.
I have just sent this to a friend and it all works on his pc, he is used
exectly the same versions of JRuby, Netbeans, Webrick…etc and it works
fine
for him.
The error I am getting is when i try to go to any page I get this:
“We’re sorry, but something went wrong.
We’ve been notified about this issue and we’ll take a look at it
shortly.”
Its the books 500 internal error message. Could it be my browser
settings?
Thanks for your input guys, I have sorted the problem with the simplest
of
solutions I should have tried earlier…
Restarted my pc, something must have messed up maybe with MySQL or maybe
with my browser. I just got so used to it being my dodgy code!! Amazing
how
you can try and over complicate things!
Thanks for your input guys, I have sorted the problem with the simplest
of
solutions I should have tried earlier…
Restarted my pc, something must have messed up maybe with MySQL or maybe
with my browser. I just got so used to it being my dodgy code!! Amazing
how
you can try and over complicate things!
Good to see you fixed it
I’m working through the same book at the moment myself (a great book
IMO) and found that when i was coding up the session stuff i had to stop
and restart the server a couple of times and also do a ‘rake
db:session:clear’ once as well. If you run into the same problem again
it’s worth trying (its not the only place in the book that doing this
has solved me problems actually).
Have fun with the rest of the book!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.