After installing rails3, I'm experiencing problems when trying to use haml with it.
I have the updated gem installed, and after rails PROJECT_NAME , I did haml --rails in its root.
It apparently had worked fine, since I have haml folder inside plugins, init.rb, as expected.
But when I try to rake, or rails server, I get:
rake aborted!
no such file to load -- haml
With --trace I get this:
** Invoke default (first_time)
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
no such file to load -- haml
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:537:in `new_constants_in'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.0.0.beta/lib/active_support/dependencies.rb:167:in `require'
RAILS_PROJECT_ROOT/vendor/plugins/haml/init.rb:5
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/plugin.rb:49
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:25:in `instance_exec'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:25:in `run'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:55:in `run_initializers'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:54:in `each'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/initializable.rb:54:in `run_initializers'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:71:in `initialize!'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/application.rb:112:in `initialize_tasks'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/test_unit/testing.rake:45
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/test_unit/testing.rake:43:in `collect'
/usr/local/lib/ruby/gems/1.8/gems/railties-3.0.0.beta/lib/rails/test_unit/testing.rake:43
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
I just needed to put gem "haml" into the Gemfile.
Another common cause of this is that Haml is installed as a gem in one RVM environment, but not the one in which the Rails app is being run.
Related
Cloned new rails project, and tried to run rake db:migrate am getting the following error message.
Backtrace:
rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment rake aborted! ArgumentError: wrong number of arguments calling `to_sql` (2 for 1)
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/jdbc/adapter.rb:535:in `select'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:16:in `select_all'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:22:in `select_one'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:28:in `select_value'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/postgresql/adapter.rb:73:in `select_version'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/postgresql/adapter.rb:81:in `redshift?'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/postgresql/adapter.rb:795:in `client_min_messages='
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/postgresql/adapter.rb:108:in `configure_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/jdbc/adapter.rb:77:in `initialize'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/postgresql/adapter.rb:1404:in `initialize'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/jdbc/connection_methods.rb:12:in `jdbc_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-jdbc-adapter-1.3.16/lib/arjdbc/postgresql/connection_methods.rb:45:in `postgresql_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:277:in `new_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:287:in `checkout_new_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:235:in `checkout' org/jruby/RubyKernel.java:1501:in `loop'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in `checkout'
home/raj/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:229:in `checkout'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:95:in `connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `retrieve_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:168:in `retrieve_connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:142:in `connection'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/model_schema.rb:308:in `clear_cache!'
home/raj/.rvm/gems/jruby-1.7.12/gems/activerecord-3.2.0/lib/active_record/railtie.rb:91:in `_callback_before_13'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/callbacks.rb:421:in `_run__141113183__prepare__2003038971__callbacks'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/callbacks.rb:405:in `__run_callback'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/callbacks.rb:390:in `_run_prepare_callbacks'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
home/raj/.rvm/gems/jruby-1.7.12/gems/actionpack-3.2.0/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
home/raj/.rvm/gems/jruby-1.7.12/gems/actionpack-3.2.0/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/application/finisher.rb:48:in `Finisher' org/jruby/RubyBasicObject.java:1562:in `instance_exec'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/initializable.rb:30:in `run'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/initializable.rb:55:in `run_initializers' org/jruby/RubyArray.java:1613:in `each'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/initializable.rb:54:in `run_initializers'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/application.rb:136:in `initialize!'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
home/raj/projects/property1view.com/config/environment.rb:5:in `(root)' org/jruby/RubyKernel.java:1065:in `require'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:236:in `load_dependency'
home/raj/.rvm/gems/jruby-1.7.12/gems/activesupport-3.2.0/lib/active_support/dependencies.rb:251:in `require'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/application.rb:1:in `(root)'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/application.rb:103:in `require_environment!' org/jruby/RubyProc.java:271:in `call'
home/raj/.rvm/gems/jruby-1.7.12/gems/railties-3.2.0/lib/rails/application.rb:292:in `initialize_tasks' org/jruby/RubyArray.java:1613:in `each'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:240:in `execute'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:179:in `invoke_with_call_chain'
home/raj/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain' org/jruby/RubyArray.java:1613:in `each'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:201:in `invoke_prerequisites'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:178:in `invoke_with_call_chain'
home/raj/.rvm/rubies/jruby-1.7.12/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task' org/jruby/RubyArray.java:1613:in `each'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:106:in `top_level'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:106:in `top_level'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:78:in `run'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/lib/rake/application.rb:75:in `run' org/jruby/RubyKernel.java:1081:in `load'
home/raj/.rvm/gems/jruby-1.7.12/gems/rake-10.4.2/bin/rake:33:in `(root)' org/jruby/RubyKernel.java:1101:in `eval'
home/raj/.rvm/gems/jruby-1.7.12/bin/jruby_executable_hooks:15:in `(root)'
Environment:
jruby-1.7.12
Rails 3.2.0
psql (PostgreSQL) 9.1.15
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2)
config/environment.rb
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
MyApplication::Application.initialize!
Simply fixed the issue by updating database related gems, using the bundle update command.
1x-193-157-255-5:HelseBackEnd ola$ rake assets:precompile
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /usr/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
syntax error on line 11, col 0: `--- '
Tasks: TOP => environment
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
1x-193-157-255-5:HelseBackEnd ola$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby /usr/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
rake aborted!
syntax error on line 11, col 0: `--- '
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:133:in `load'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:144:in `load_file'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:143:in `open'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/yaml.rb:143:in `load_file'
/Library/Ruby/Gems/1.8/gems/actionpack-3.2.3/lib/sprockets/railtie.rb:42
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `instance_exec'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:30:in `run'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:55:in `run_initializers'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `each'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/initializable.rb:54:in `run_initializers'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:136:in `initialize!'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `send'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/ola/Documents/Coding/HelseBackEnd/config/environment.rb:5
/Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:236:in `load_dependency'
/Library/Ruby/Gems/1.8/gems/activesupport-3.2.3/lib/active_support/dependencies.rb:251:in `require'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:103:in `require_environment!'
/Library/Ruby/Gems/1.8/gems/railties-3.2.3/lib/rails/application.rb:292:in `initialize_tasks'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:93
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:60
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Tasks: TOP => environment
rake aborted!
Command failed with status (1): [/System/Library/Frameworks/Ruby.framework/...]
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `create_shell_runner'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/Library/Ruby/Gems/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/Library/Ruby/Gems/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/Library/Ruby/Gems/1.8/gems/actionpack-3.2.3/lib/sprockets/assets.rake:29
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Tasks: TOP => assets:precompile
1x-193-157-255-5:HelseBackEnd ola$
Is this a problem with my code, or could it be deeper in the core? I can't figure out which file the 11th line is having a problem running.
I'm trying to setup my Heroku app but when I'm trying to run db:setup, db:create then I get:
[hauleth#NIUNIOBOOK] Tori $ heroku run rake --trace db:setup
Running rake --trace db:setup attached to terminal... up, run.1
** Invoke db:setup (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
rake aborted!
string not matched
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/tasks/misc.rake:4:in `[]='
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/tasks/misc.rake:4:in `block in <top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158: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.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157: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.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157: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.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157: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.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33: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>'
Tasks: TOP => db:setup => db:create => db:load_config => rails_env
And when I try db:migrate then:
[hauleth#NIUNIOBOOK] Tori $ heroku run rake --trace db:migrate
Running rake --trace db:migrate attached to terminal... up, run.1
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
Invalid DATABASE_URL
(erb):9:in `rescue in <main>'
(erb):6:in `<main>'
/usr/local/lib/ruby/1.9.1/erb.rb:753:in `eval'
/usr/local/lib/ruby/1.9.1/erb.rb:753:in `result'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/application/configuration.rb:106:in `database_configuration'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/railtie.rb:68:in `block (2 levels) in <class:Railtie>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.1.3/lib/active_record/railtie.rb:67:in `block in <class:Railtie>'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:83:in `require_environment!'
/app/vendor/bundle/ruby/1.9.1/gems/railties-3.1.3/lib/rails/application.rb:193:in `block (2 levels) in initialize_tasks'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:158: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.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:176:in `block in invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:157: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.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/app/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33: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>'
Tasks: TOP => db:migrate => environment
How to fix that? I'm running on Cedar stack with Rails 3.1.3.
I have tested that Ruby see ENV['DATABASE_URL'] and also I've tested that URI.parse works on it. So where is the exception?
EDIT
It's my first migration in new app. I'v checked that heroku run console can access the ENV['DATABASE_URL'] and than URI#parse is not throwin' any error.
Your DATABASE_URL might be missing or nil.
Check with:
heroku config
If it looks OK, try re-adding the add-on:
heroku addons:remove shared-database:5mb
heroku addons:add shared-database:5mb
I've fixed that by recreating full Git an Heroku app.
I'd like to be able to run rspec and cucumber on my staging app on Heroku. I have a separate production app and I push my development branch to staging and my master branch to production.
I have set the RACK_ENV variable to 'staging' and have also added a staging.rb config file.
Running rspec and cucumber locally:
Both rspec and cucumber run fine locally using the commands
$ rspec spec
..
$ cucumber features
Running rspec on Heroku staging app
The problem is that I can't get them to run on my Heroku staging app. I understand that the correct way to rspec on Heroku is:
$ heroku rake spec --remote staging
Whenever I run this though I get the following errors:
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/railties/databases.rake:429:in `block (3 levels) in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/railties/databases.rake:460:in `block (3 levels) in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
(in /app)
Running cucumber on Heroku staging app
Similarly:
$ heroku rake cucumber --remote staging
Results in:
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/railties/databases.rake:429:in `block (3 levels) in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/app/.bundle/gems/ruby/1.9.1/gems/activerecord-3.0.7/lib/active_record/railties/databases.rake:460:in `block (3 levels) in <top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
(in /app)
The issue is clearly something to do with the database but I'm not sure how to address it.
The problem is that testing uses a separate database, not the one on which the application is running. This second database you don't get on Heroku. See Running Rails unit tests on Heroku for the answer to a similar question.
I'm trying to install Radiant CMS but whenever I run:
rake db:bootstrap
Inside the project directory I get:
rake aborted!
RedCloth is not a class
Here is the full trace:
(in /Users/richardjburton/testradiant)
** Invoke db:bootstrap (first_time)
** Invoke db:remigrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
RedCloth is not a class
/Users/richardjburton/testradiant/vendor/radiant/vendor/redcloth/lib/redcloth.rb:167
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/Users/richardjburton/testradiant/vendor/radiant/lib/radiant/initializer.rb:98:in `library_directories'
/Users/richardjburton/testradiant/vendor/radiant/lib/radiant/initializer.rb:134:in `default_load_paths'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/railties/lib/initializer.rb:839:in `initialize'
/Users/richardjburton/testradiant/vendor/radiant/lib/radiant/initializer.rb:21:in `initialize'
/Users/richardjburton/testradiant/vendor/radiant/lib/radiant/initializer.rb:155:in `new'
/Users/richardjburton/testradiant/vendor/radiant/lib/radiant/initializer.rb:155:in `run'
/Users/richardjburton/testradiant/config/environment.rb:12
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
/Users/richardjburton/testradiant/vendor/radiant/vendor/rails/railties/lib/tasks/misc.rake:4
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
I'm guessing you don't have redcloth installed on that machine.
sudo if you normally do
gem install redcloth
I believe that should be:
gem install RedCloth
I didn't have XCode installed on my mac. Whoops!
You need Recloth gem, so that Radiant is able to use Textile markup