I was using my server yesterday no problem. Came back today with an error when starting the server
runnerw.exe C:\Ruby187\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "C:/Users/Stefan/RubymineProjects/gallery/gallery-app/script/rails" server -b 127.0.0.1 -p 3000 -e development
=> Booting WEBrick
=> Rails 3.2.8 application starting in development on http://127.0.0.1:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:278:in `eval_block': C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/mapper.rb:1508: syntax error, unexpected kEND, expecting $end (SyntaxError)
from C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:297:in `clear!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:297:in `each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:297:in `clear!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:35:in `clear!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:33:in `each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:33:in `clear!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:15:in `reload!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:26:in `updater'
from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in `call'
from C:/Ruby187/lib/ruby/gems/1.8/gems/activesupport-3.2.8/lib/active_support/file_update_checker.rb:78:in `execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/routes_reloader.rb:27:in `updater'
from C:0:in `execute_if_updated'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application/finisher.rb:66
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `instance_exec'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:30:in `run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:55:in `run_initializers'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/initializable.rb:54:in `run_initializers'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/application.rb:136:in `initialize!'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `send'
from C:/Ruby187/lib/ruby/gems/1.8/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config/environment.rb:5
from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:4:in `require'
from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:4
from C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from C:/Ruby187/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:1:in `new'
from C:/Users/Stefan/RubymineProjects/gallery/gallery-app/config.ru:1
Process finished with exit code 1
Not sure what could be causing this and it's baffling me why its only now decided to pop up.
I was able to fix this by reinstalling the actionpack gem. It must have got corrupt or I accidently changed it between last night and today.
Related
I've recently moved over from the ruby-aaws gem to asin gem, which is a lot simpler to use and understand. However, I've encountered a really strange issue that's causing search failures for specific queries and only on heroku.
My code is the following:
require 'asin'
client = ASIN::Client.instance
client.search(:Keywords => "Shark Tale", :SearchIndex => :UnboxVideo, :ResponseGroup => :ItemAttributes)
When this runs on my local box, it works perfect without issue. However, when I run this on heroku, I see the following error logs:
REXML::ParseException: #<NoMethodError: undefined method `[]' for nil:NilClass>
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:340:in `pull_event'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
/app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:203:in `parse'
/app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:235:in `parse'
/app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:375:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:197:in `search'
(irb):223:in `irb_binding'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/workspace.rb:86:in `eval'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/workspace.rb:86:in `evaluate'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/context.rb:380:in `evaluate'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:492:in `block (2 levels) in eval_input'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:624:in `signal_status'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:489:in `block in eval_input'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:247:in `block (2 levels) in each_top_level_statement'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `loop'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:233:in `block in each_top_level_statement'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `catch'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb/ruby-lex.rb:232:in `each_top_level_statement'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:488:in `eval_input'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:397:in `block in start'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:396:in `catch'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/irb.rb:396:in `start'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
/app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
...
Exception parsing
Line: 1
Position: 30315
Last 80 unconsumed characters:
Actor><Actor>Matthew Broderick</Actor><Actor>Patrick Warburton</Actor><Actor>J
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:439:in `rescue in pull_event'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:331:in `pull_event'
from /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rexml/parsers/baseparser.rb:183:in `pull'
from /app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:203:in `parse'
from /app/vendor/bundle/ruby/2.0.0/gems/crack-0.4.0/lib/crack/xml.rb:235:in `parse'
from /app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:375:in `call'
from /app/vendor/bundle/ruby/2.0.0/gems/asin-1.1.2/lib/asin/client.rb:197:in `search'
from (irb):223
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
from /app/vendor/bundle/ruby/2.0.0/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
This fails around 9 out of 10 times on Heroku. I tried a few variations and some of the following variations succeed all the time:
Change the query slightly
client.search(:Keywords => "Shark Tales", :SearchIndex => :UnboxVideo, :ResponseGroup => :ItemAttributes)
Change the ResponseGroup
client.search(:Keywords => "Shark Tale", :SearchIndex => :UnboxVideo, :ResponseGroup => :Offers)
Does anyone know what's causing this?
Realized that the discrepancy between my local box and heroku is with ruby version.
I'm using 1.9.3 on local box whereas my heroku setting is 2.0.0
This is a solution for 2.0.0 from the author of the asin gem
http://asin.herokuapp.com/
I am using ruby 1.8.7 and tried to upgrade the rails version from 3.0.7 to 3.2.11 for the existing application. I have installed all the relative gems and bundle install is also complete but when I start the rails server using rails s, Its showing me the errors.
rails s
=> Booting WEBrick
=> Rails 3.2.11 application starting in development on .....
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require': no such file to load -- journey (LoadError)
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /var/lib/gems/1.8/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:1
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/engine.rb:489:in `routes'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/engine.rb:551
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `send'
from /var/lib/gems/1.8/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/anshul/herematch/config/environment.rb:5
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/lib/gems/1.8/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
from /home/anshul/herematch/config.ru:3
from /var/lib/gems/1.8/gems/rack-1.2.4/lib/rack/builder.rb:46:in `instance_eval'
from /var/lib/gems/1.8/gems/rack-1.2.4/lib/rack/builder.rb:46:in `initialize'
from /home/anshul/herematch/config.ru:1:in `new'
from /home/anshul/herematch/config.ru:1
Please help me!!!
I'm doing Michael Hartl's Rails Tutorials and am having a bit of a problem with the final stage of the Demo App, that is, running the rake command on Heroku to migrate the database to the web.
The rake command with a --trace on it gives the following result:
$ heroku run rake db:migrate --trace
Running `rake db:migrate --trace` attached to terminal...
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36: command not found: tput cols
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36: command not found: tput lines
up, run.1
(in /app)
* Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
no such file to load -- pg
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `block in require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:227:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.0.1/lib/active_support/dependencies.rb:239:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/postgresql_adapter.rb:9:in `postgresql_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in `new_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:238:in `checkout_new_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:194:in `block (2 levels) in checkout'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `loop'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `block in checkout'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:189:in `checkout'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in `connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:318:in `retrieve_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:486:in `initialize'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:433:in `new'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:433:in `up'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/migration.rb:415:in `migrate'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.0.1/lib/active_record/railties/databases.rake:142:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:597:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2029:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2001:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `load'
/app/vendor/bundle/ruby/1.9.1/bin/rake:19:in `<main>'
I thought that that 'command not found: tput' stuff at the start might have been down to something I modified (it looks like the word 'output' that got cut off) so I redid the entire chapter from the beginning, but ended up with the same result, so I don't think it's any changes I made to the code.
I'm using a Windows PC, running XP. Everything worked fine when run on the localhost and my Git Repository pushed to Heroku perfectly, so everything works except for this rake command. If ye want to see any of the other files, they're at: https://github.com/jimbobsweeney/demo_app
I'm very grateful in advance for any help on this. It's melting my brain.
Rob
Do you have Cygwin installed? This article (in Japanese) mentions this error and points to this SO question which suggests you make sure Cygwin and possibly ncurses is installed. A comment there links to this article which may also have useful information.
It looks like the issue is that heroku is looking for the tput command in your shell which is not available (which I believe comes with ncurses).
As for the stack trace, it looks like the pg gem is not in your Gemfile in a place the production environment will execute it. It's not necessary to install pg on Windows just to get the deploy working. Create a :production group in your Gemfile for this.
group :production do
gem "pg", "~> 0.11.0"
end
You can learn more about groups in the bundler docs.
I went to restart my rails server today and when I went to fire it back up here's the error I got. I've tried everything and haven't been able to crack it. I uninstalled and reinstalled activesupport 3.1.0, and it seems like there's an error in activesupport itself, which I doubt I can fix. So, color me confused (paint me perplexed). Any advice much appreciated.
$ RESQUE_INTERFACE=true rails s
=> Booting WEBrick
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load': /Users/nickgoddard/codebase/newshop/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_newshop_session'
^
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/engine.rb:555
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/engine.rb:554:in `each'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/engine.rb:554
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `run_initializers'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `send'
from /Library/Ruby/Gems/1.8/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/nickgoddard/codebase/newshop/config/environment.rb:5
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Library/Ruby/Gems/1.8/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
from /Users/nickgoddard/codebase/newshop/config.ru:4
from /Library/Ruby/Gems/1.8/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
from /Library/Ruby/Gems/1.8/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
from /Users/nickgoddard/codebase/newshop/config.ru:1:in `new'
from /Users/nickgoddard/codebase/newshop/config.ru:1
You're trying to run Ruby 1.9 code on Ruby 1.8, specifically the session_store hash parameters.
Usually, when you create a new Rails app, it should know this, but I'm not sure of the specifics about how you set up your app (or maybe you cloned someone else's?). To create an app and force it to use the 1.8 style of hashes, do:
rails new my_app --old-style-hash
Or, you can use something like rvm or rbenv to install Ruby 1.9 and use that instead.
I have a problem with setting up rails application. We use rails 3 (we also use memcached), and have I installed everthing (DB, ruby, rubygems, rails, ...) and configure the DB. So if I run rails server the apllication starts ok.
For production we will use Apache and Phusion Passenger, both have been installed sucessfuly. When I restart apache I get this error:
*
[ pid=1557 thr=-608134948 file=utils.rb:176 time=2011-08-13 12:51:05.974 ]: *** Exception NameError in PhusionPassenger::Rack::ApplicationSpawner (undefined local variable or method `application_controller' for main:Object) (process 1557, thread #<Thread:0xb78131b8>):
from /media/Disc/ABC/CODE/TESTINGAPP/app/controllers/application.rb:1
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:227:in `load_dependency'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:346:in `require_or_load'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:300:in `depend_on'
from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:216:in `require_dependency'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:138:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:137:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/engine.rb:135:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:108:in `eager_load!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application/finisher.rb:41
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `send'
from /usr/lib/ruby/gems/1.8/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
from /media/Disc/ABC/CODE/TESTINGAPP/config/environment.rb:5
from config.ru:3:in `require'
from config.ru:3
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from config.ru:1:in `new'
from config.ru:1
*
First I thought that it might be sometnig with memcached, like some missing module for apache, but I read that there is no configuration needed for apache/passenger.
My question is, why application doesn't start? Have I forgot to install or configure someting? I really don't know what might be wronge since the application starts ok with rails server.
Tnx in advance ;)
Look at this file:
/media/Disc/ABC/CODE/TESTINGAPP/app/controllers/application.rb
Since Rails 2.3 this file should be called application_controller.rb and not application.rb. Rename the file and it should work:
/media/Disc/ABC/CODE/TESTINGAPP/app/controllers/application_controller.rb