Please could someone help me understand what has gone wrong, and how I can lookout/debug these things in the future. I have set-up a RefineryCMS app in Rails, worked on it, uploaded it to Heroku and have had both the local and remote copies working fine. After a period of about a month I return to the local copy to work on it, but it won't load. I can't understand why as nothing has changed. I tried deleting the local copy and cloning again from heroku but same issue exists. The error code is below when I try and create a rails server locally to run the app.
I would welcome help with the error, and perhaps how to spot/avoid these things in the future
/home/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse': couldn't parse YAML at line 7 column 0 (Psych::SyntaxError)
from /home/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:148:in `parse_stream'
from /home/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:119:in `parse'
from /home/adam/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:106:in `load'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activerecord-3.0.11/lib/active_record/base.rb:1868:in `object_from_yaml'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activerecord-3.0.11/lib/active_record/attribute_methods/read.rb:129:in `unserialize_attribute'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activerecord-3.0.11/lib/active_record/attribute_methods/read.rb:112:in `_read_attribute'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activerecord-3.0.11/lib/active_record/attribute_methods/read.rb:101:in `read_attribute'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activerecord-3.0.11/lib/active_record/base.rb:1525:in `[]'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:158:in `value'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:61:in `block in to_cache'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:58:in `collect'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:58:in `to_cache'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:73:in `rewrite_cache'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:36:in `ensure_cache_exists!'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:44:in `cache_read'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:109:in `get'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-settings-1.0.9/app/models/refinery_setting.rb:95:in `find_or_set'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-images-1.0.9/lib/refinerycms-images.rb:33:in `block (2 levels) in <class:Engine>'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:35:in `configure'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/dragonfly-0.9.8/lib/dragonfly/configurable.rb:42:in `configure_with'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/refinerycms-images-1.0.9/lib/refinerycms-images.rb:24:in `block in <class:Engine>'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/initializable.rb:25:in `instance_exec'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/initializable.rb:25:in `run'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/initializable.rb:50:in `block in run_initializers'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/initializable.rb:49:in `each'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/initializable.rb:49:in `run_initializers'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/application.rb:134:in `initialize!'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/application.rb:77:in `method_missing'
from /home/adam/web/beloved/config/environment.rb:5:in `<top (required)>'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `block in require'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:593:in `new_constants_in'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/activesupport-3.0.11/lib/active_support/dependencies.rb:239:in `require'
from /home/adam/web/beloved/config.ru:3:in `block in <main>'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/builder.rb:46:in `instance_eval'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/builder.rb:46:in `initialize'
from /home/adam/web/beloved/config.ru:1:in `new'
from /home/adam/web/beloved/config.ru:1:in `<main>'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/builder.rb:35:in `eval'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/builder.rb:35:in `parse_file'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/server.rb:162:in `app'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/server.rb:253:in `wrapped_app'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/rack-1.2.4/lib/rack/server.rb:204:in `start'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/commands/server.rb:65:in `start'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/commands.rb:30:in `block in <top (required)>'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/commands.rb:27:in `tap'
from /home/adam/.rvm/gems/ruby-1.9.2-p290#beloved2/gems/railties-3.0.11/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Thanks for your help,
Adam
Add to config/boot.rb:
require 'yaml'
YAML::ENGINE.yamler = 'syck'
Read more here
Related
I know that there is a lot of such kind of questions, but still, I believe my case is slightly different.
I recently decided to build in an AWS-S3 gem to my rails version 3 project (RUBY_VERSION - 1.9.2p320).
After the successfully aws-sdk gem have been installed, I've got an error message on rails server
/root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-core-3.78.0/lib/seahorse/client/net_http/patches.rb:26:in `alias_method': undefined method `new_transport_request' for class `Net::HTTP' (NameError)
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-core-3.78.0/lib/seahorse/client/net_http/patches.rb:26:in `apply!'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-core-3.78.0/lib/seahorse/client/net_http/connection_pool.rb:10:in `<top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-core-3.78.0/lib/seahorse.rb:34:in `require_relative'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-core-3.78.0/lib/seahorse.rb:34:in `<top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `block in require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:597:in `new_constants_in'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:225:in `load_dependency'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-core-3.78.0/lib/aws-sdk-core.rb:2:in `<top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `block in require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:597:in `new_constants_in'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:225:in `load_dependency'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-resources-3.59.0/lib/aws-sdk-resources.rb:1:in `<top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `block in require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:597:in `new_constants_in'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:225:in `load_dependency'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/activesupport-3.0.19/lib/active_support/dependencies.rb:242:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/aws-sdk-3.0.1/lib/aws-sdk.rb:1:in `<top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `block in require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
from /jasa/api/trunk/config/application.rb:7:in `<top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/railties-3.0.19/lib/rails/commands.rb:28:in `require'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/railties-3.0.19/lib/rails/commands.rb:28:in `block in <top (required)>'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/railties-3.0.19/lib/rails/commands.rb:27:in `tap'
from /root/.rbenv/versions/1.9.2-p320/lib/ruby/gems/1.9.1/gems/railties-3.0.19/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I've tried both
gem 'aws-sdk', '~> 3'
and
gem 'aws-sdk-s3', '~> 1'
I've checked the referred module in github, but got hothing to catch on.
What am I doing wrong?
Thanks a lot. Any help will be appreciated.
I think it's clear based on referred module that you posted in your question. If you see the code new_transport_request method is defined in module Ruby_2 (line 30) and module Ruby_1_9_3 (line 83) and then if you see line 19 to 24 :
if RUBY_VERSION >= '2.0'
Net::HTTP.send(:include, Ruby_2)
Net::HTTP::IDEMPOTENT_METHODS_.clear
elsif RUBY_VERSION >= '1.9.3'
Net::HTTP.send(:include, Ruby_1_9_3)
end
there is no if condition for ruby 1.9.2. In conclusion the issue is not coming from Ruby or Rails but from the gem that does not support ruby 1.9.2.
You might just need to upgrade the ruby to 1.9.3 and it should fix this issue. Furthermore ruby 1.9.2 is no longer maintained so it's good idea to upgrade to avoid security vulnerability. I hope it's help.
Thank you.
I'd start with an update to the latest rails, but incrementally, of course. ActiveStorage feature changes and the latest gem. No telling what went south since Rails 3
I am trying to start a unicorn server. It was working fine before. Suddenly after a server restart, this error popped.
I, [2014-05-25T17:04:20.480271 #13922] INFO -- : Refreshing Gem list
/home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require': No such file to load -- Token (LoadError)
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /home/quarterback/apps/quarterback-rails/releases/20140525165531/app/controllers/domains_controller.rb:1:in `<top (required)>'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:348:in `require_or_load'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:307:in `depend_on'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:225:in `require_dependency'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:468:in `block (2 levels) in eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:467:in `each'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:467:in `block in eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:465:in `each'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:465:in `eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/engine.rb:346:in `eager_load!'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/application/finisher.rb:58:in `each'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/application/finisher.rb:58:in `block in <module:Finisher>'
from /home/quarterback/apps/quarterback-rails/shared/bundle/ruby/2.1.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'**strong text**
Silly one. I had a require 'Token' in one of my files.
When i run rails server,i encountered this error.
'bundle install' has been success.My RVM use ruby 1.9.3 and rails 3.2 but the project need rails 3.1.I think the bundle has already solved the because of the bundle.The rails and ruby might not be the reason.
Anything would be help.Thanks
Your bundle is complete!
It was installed into ./vendor/bundle
magic#magic-ThinkPad-T430u:~/Documents/rails/ticketee-book$ rails server
=> Booting WEBrick
=> Rails 3.1.0.rc2 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/railtie/configurable.rb:30:in `method_missing': undefined method `user_class=' for #<Forem::Engine:0x9de6bc0> (NoMethodError)
from /home/magic/Documents/rails/ticketee-book/config/initializers/forem.rb:1:in `<top (required)>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:235:in `load'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:235:in `block in load'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:641:in `new_constants_in'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:235:in `load'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/engine.rb:544:in `block (2 levels) in <class:Engine>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/engine.rb:543:in `each'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/engine.rb:543:in `block in <class:Engine>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:25:in `instance_exec'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:25:in `run'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:50:in `block in run_initializers'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:49:in `each'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/initializable.rb:49:in `run_initializers'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/application.rb:96:in `initialize!'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/magic/Documents/rails/ticketee-book/config/environment.rb:5:in `<top (required)>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:239:in `require'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:239:in `block in require'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `block in load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:641:in `new_constants_in'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:225:in `load_dependency'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/activesupport/lib/active_support/dependencies.rb:239:in `require'
from /home/magic/Documents/rails/ticketee-book/config.ru:4:in `block in <main>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:51:in `instance_eval'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:51:in `initialize'
from /home/magic/Documents/rails/ticketee-book/config.ru:1:in `new'
from /home/magic/Documents/rails/ticketee-book/config.ru:1:in `<main>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:40:in `eval'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/builder.rb:40:in `parse_file'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:200:in `app'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands/server.rb:46:in `app'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:301:in `wrapped_app'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/gems/rack-1.3.0/lib/rack/server.rb:252:in `start'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands/server.rb:70:in `start'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands.rb:54:in `block in <top (required)>'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands.rb:49:in `tap'
from /home/magic/Documents/rails/ticketee-book/vendor/bundle/ruby/1.9.1/bundler/gems/rails-623c16f4f8b7/railties/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Try running server with bundle command. It will use all gems that are defined in your Gemfile then:
bundle exec rails server
I am trying to modify a rails app built on an another computer ,I ran bundle install
and all gems got installed.But when I run rake db:migrate ,it throws down a bunch of errors ,I am new to rail and cant understand what those error messages
rake aborted!
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_current_thread - /home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `require'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#global/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
/home/diadara/hw3_rottenpotatoes/config/application.rb:13:in `<top (required)>'
/home/diadara/hw3_rottenpotatoes/Rakefile:5:in `require'
/home/diadara/hw3_rottenpotatoes/Rakefile:5:in `<top (required)>'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/bin/rake:19:in `<main>'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/bin/ruby_noexec_wrapper:14:in `eval'
/home/diadara/.rvm/gems/ruby-1.9.3-p374#saasrails3.1/bin/ruby_noexec_wrapper:14:in `<main>'
it looks like you did not properly install ruby-debug in your project. remove it from the gemfile if it is not needed or have a look at this answer to fix it: Cannot use ruby-debug19 with 1.9.3-p0?
I was looking to deploy my first rails app, and have been experiencing some issues. First off, everything works fine in the development server, so I figured I was good to go. After failed to deploy the app to my host, I tried to launch the server in production mode for the first time, receiving several errors.
Out of curiousity, I created a new app, completely fresh without me editing any code. I'm getting pretty much the same errors about my database:
/home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:62:in `establish_connection': =production database is not configured (ActiveRecord::AdapterNotSpecified)
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/railtie.rb:59:in `block (2 levels) in <class:Railtie>'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activesupport-3.0.3/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/activerecord-3.0.3/lib/active_record/railtie.rb:57:in `block in <class:Railtie>'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `instance_exec'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/initializable.rb:25:in `run'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/initializable.rb:50:in `block in run_initializers'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `each'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/initializable.rb:49:in `run_initializers'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/application.rb:134:in `initialize!'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/application.rb:77:in `method_missing'
from /home/sweiss/testapp/config/environment.rb:6:in `<top (required)>'
from /home/sweiss/testapp/config.ru:3:in `require'
from /home/sweiss/testapp/config.ru:3:in `block in <main>'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
from /home/sweiss/testapp/config.ru:1:in `new'
from /home/sweiss/testapp/config.ru:1:in `<main>'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/builder.rb:35:in `eval'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/builder.rb:35:in `parse_file'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/server.rb:162:in `app'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/server.rb:248:in `wrapped_app'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/server.rb:213:in `start'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands/server.rb:65:in `start'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands.rb:30:in `block in <top (required)>'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands.rb:27:in `tap'
from /home/sweiss/.rvm/gems/ruby-1.9.2-p0/gems/railties-3.0.3/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Has anyone experiences this while trying to launch a production server? The database.yml, just for good measure, is the following default for sqlite3:
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
I verified the .yml had no tabs (not that it should auto-generated).
Anyway, I appreciate the help.
Have you installed the sqlite3 gem? Sounds to me like it can't find the adapter.