Starting my small Hanami application via
bundle exec hanami server
works fine.
Serving it with puma-dev fails, however, I am getting this in ~/Library/Logs/puma-dev.log:
! Booting app 'zipper-b2957350' on socket /Users/alexander/.puma-dev/zipper/tmp/puma-dev-800.sock
zipper-b2957350[79711]: bash: no job control in this shell
zipper-b2957350[79711]: sourcing /etc/profile
zipper-b2957350[79711]: Interactive
zipper-b2957350[79711]: Login shell
zipper-b2957350[79711]: sourcing .bash_profile
zipper-b2957350[79711]: sourcing .profile
zipper-b2957350[79711]: Puma starting in single mode...
zipper-b2957350[79711]: * Puma version: 5.3.2 (ruby 2.7.1-p83) ("Sweetnighter")
zipper-b2957350[79711]: * Min threads: 0
zipper-b2957350[79711]: * Max threads: 5
zipper-b2957350[79711]: * Environment: development
zipper-b2957350[79711]: * PID: 79711
zipper-b2957350[79711]: ! Unable to load application: Bundler::GemNotFound: Could not find rake-13.0.6 in any of the sources
zipper-b2957350[79711]: /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:86:in `block in materialize': Could not find rake-13.0.6 in any of the sources (Bundler::GemNotFound)
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:80:in `map!'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/spec_set.rb:80:in `materialize'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:170:in `specs'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:237:in `specs_for'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/definition.rb:226:in `requested_specs'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:101:in `block in definition_method'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/runtime.rb:20:in `setup'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler.rb:149:in `setup'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `block in <top (required)>'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:136:in `with_level'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/ui/shell.rb:88:in `silence'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/bundler/setup.rb:20:in `<top (required)>'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require'
zipper-b2957350[79711]: from /Users/alexander/projects/zipper/config/environment.rb:1:in `<top (required)>'
zipper-b2957350[79711]: from config.ru:1:in `require_relative'
zipper-b2957350[79711]: from config.ru:1:in `block in <main>'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/configuration.rb:345:in `load_rackup'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/configuration.rb:267:in `app'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/runner.rb:143:in `load_and_bind'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/single.rb:44:in `run'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/launcher.rb:181:in `run'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/lib/puma/cli.rb:80:in `run'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/lib/ruby/gems/2.7.0/gems/puma-5.3.2/bin/puma:10:in `<top (required)>'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/bin/puma:23:in `load'
zipper-b2957350[79711]: from /Users/alexander/.asdf/installs/ruby/2.7.1/bin/puma:23:in `<main>'
! Killing 'zipper-b2957350' (79711) - 'stdout/stderr closed'
* App 'zipper-b2957350' shutdown and cleaned up
! Detecting app 'zipper-b2957350' dying on start
I don't understand why this doesn't work and would expect a rack app with a config.ru file to just work. Can somebody help?
Solved it!
I added puma to the Gemfile and everything started working. Makes sense.
Related
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.
Here is the error...
C:\Sites\simple_cms>rails s
> => Booting WEBrick
> => Rails 3.2.13 application starting in development on http://X.X.X.X:3000
> => Call with -d to detach
> => Ctrl-C to shutdown server
Exiting
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bundler-1.3.5/lib/bundler/rubygems_integ
ration.rb:214:in `block in replace_gem': Please install the mysql2 adapter: `gem
install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it
to Gemfile.) (LoadError)
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/mysql2_adapter.rb:3:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `block in require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:236:in `load_dependency'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/dependencies.rb:251:in `require'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:50:in `resol
ve_hash_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:41:in `resol
ve_string_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/connection_adapters/abstract/connection_specification.rb:130:in `esta
blish_connection'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:82:in `block (2 levels) in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:36:in `execute_hook'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/ac
tive_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/base.rb:720:in `<top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/activerecord-3.2.13/lib/act
ive_record/railtie.rb:88:in `block in <class:Railtie>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `instance_exec'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:30:in `run'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:55:in `block in run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `each'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/i
nitializable.rb:54:in `run_initializers'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/a
pplication.rb:136:in `initialize!'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/r
ailtie/configurable.rb:30:in `method_missing'
from C:/Sites/simple_cms/config/environment.rb:5:in `<top (required)>'
from C:/Sites/simple_cms/config.ru:3:in `require'
from C:/Sites/simple_cms/config.ru:3:in `block in <main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:51:in `instance_eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:51:in `initialize'
from C:/Sites/simple_cms/config.ru:in `new'
from C:/Sites/simple_cms/config.ru:in `<main>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:40:in `eval'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/builder
.rb:40:in `parse_file'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:200:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands/server.rb:46:in `app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:304:in `wrapped_app'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/rack-1.4.5/lib/rack/server.
rb:254:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands/server.rb:70:in `start'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:55:in `block in <top (required)>'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `tap'
from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/c
ommands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Any help will be appreciated as I have followed all other threads with no joy. Thanks in advance
you have to read the error message carefully, it's in there ;)
Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (mysql2 is not part of the bundle. Add it to Gemfile.) (LoadError)
just add gem 'mysql2' to your Gemfile, and run bundle install.
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
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
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.