I am migrating my rails app from Rails 2.3 to 3.2. I have ActiveSupport 3.2 dependency but at app startup I keep getting following error. I am not using active_support/secure_random anywhere in my code. Can someone please help me solve this problem?
Error Logs -
[Thu Sep 04 22:52:56.014721 2014] [:warn] [pid 1440] FastCGI: server "AppRootFolder/bin/rails_dispatch.fcgi" (pid 1554) terminated by calling exit with status '1'
AppRootFolder/ruby1.9/gems/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:317:in rescue in depend_on': No such file to load -- active_support/secure_random (LoadError) from AppRootFolder/ruby1.9/gems/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:312:independ_on'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/activesupport-3.2.19/lib/active_support/dependencies.rb:225:in require_dependency' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:444:inblock (2 levels) in eager_load!'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:443:in each' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:443:inblock in eager_load!'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:441:in each' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/engine.rb:441:ineager_load!'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/application/finisher.rb:53:in block in <module:Finisher>' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:30:ininstance_exec'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:30:in run' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:55:inblock in run_initializers'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:54:in each' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/initializable.rb:54:inrun_initializers'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/application.rb:136:in initialize!' from AppRootFolder/ruby1.9/gems/1.9.1/gems/railties-3.2.19/lib/rails/railtie/configurable.rb:30:inmethod_missing'
from AppRootFolder/var/rails-root/config/environment.rb:4:in <top (required)>' from AppRootFolder/ruby1.9/1.9.1/rubygems/custom_require.rb:36:inrequire'
from AppRootFolder/ruby1.9/1.9.1/rubygems/custom_require.rb:36:in require' from AppRootFolder/var/rails-root/config.ru:3:inblock in '
from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in instance_eval' from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:ininitialize'
from AppRootFolder/var/rails-root/config.ru:in new' from AppRootFolder/var/rails-root/config.ru:in'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:in eval' from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:40:inparse_file'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:200:in app' from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:304:inwrapped_app'
from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:254:in start' from AppRootFolder/ruby1.9/gems/1.9.1/gems/rack-1.4.5/lib/rack/server.rb:137:instart'
from AppRootFolder/bin/rails_dispatch.fcgi:20:in `'
ActiveSupport::SecureRandom was removed from rails 3.2 because rails 3.2 requires ruby 1.8.7 already has a builtin SecureRandom.
Replace any requires with
require 'securerandom'
And use SecureRandom instead.
If you're not using SecureRandom directly then you are probably using a gem that does, for example old versions of devise.
Related
I upgraded my ruby gem and rails to the latest version. Fixed all the dependencies but still, I am unable to start my rails application.
When I try rails s, I get the below error. I am not sure how to fix this. Any help would be appreciated.
=> Booting WEBrick
=> Rails 4.1.7 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
/Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Fixnum is deprecated
/Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:121: warning: constant ::Bignum is deprecated
Exiting
Traceback (most recent call last):
5437: from bin/rails:3:in `<main>'
5436: from bin/rails:3:in `load'
5435: from /Users/sri/Documents/imcmarketplace/bin/spring:16:in `<top (required)>'
5434: from /Users/sri/Documents/imcmarketplace/bin/spring:16:in `require'
5433: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
5432: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
5431: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
5430: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
... 5425 levels...
4: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
3: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
2: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
1: from /Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>'
/Users/sri/.rvm/gems/ruby-2.5.1/gems/activesupport-4.1.7/lib/active_support/core_ext/numeric/conversions.rb:131:in `block (2 levels) in <class:Numeric>': stack level too deep (SystemStackError)
Thanks
Sri
I think the problem is related to your ruby and rails version and I think you need to downgrade ruby version or upgrade the rails version
for more check here Ruby 2.4 and Rails 4 stack level too deep (SystemStackError)
To resolve this issue goto Gemfile use gem 'spring' don't add the version of the spring. Then do the bundle install. Still, you have an issue remove the Gemfile.lock then do the bundle install. I hope this will help you.
Currently using rails 4.2.0 & ruby 2.2.0p0
re-bundled to pick up some gem updates
RAILS_ENV=production rails c fails with the following stack trace
/home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:76:in require': File is already defined (NameError)
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:76:inblock (2 levels) in require'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:72:in each'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:72:inblock in require'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:in each'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler/runtime.rb:61:inrequire'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/bundler-1.7.11/lib/bundler.rb:134:in require'
from /home/linkee/linker/config/application.rb:14:in'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:141:in require'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:141:inrequire_application_and_environment!'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:67:in console'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:inrun_command!'
from /home/linkee/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in <top (required)>'
from /home/linkee/linker/bin/rails:4:inrequire'
from /home/linkee/linker/bin/rails:4:in `'
I note that the runtime.rb fails when trying to require 'zipruby' so I excluded that gem from being required by changing line 76 in require.rb to
pp required_file = file
Kernel.require(file) unless file == 'zipruby'
and that at least bypassed whatever the problem was.
Please let me know if you require further information to help in sorting out this problem.
I have recently migrated an existing rails 3.2.3 app to rails 4.0.0.rc2. I have made all the necessary changes and have been able to make it work fine on my local. But when I push this to heroku - "git push heroku master", it says failed to push some refs. The follwoing is the stack trace -
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in initialize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:825:innew'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in connect'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:542:ininitialize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in new'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:inpostgresql_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in new_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:incheckout_new_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in acquire_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:inblock in checkout'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in checkout'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:inblock in connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:inretrieve_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_handling.rb:79:in retrieve_connection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/connection_handling.rb:53:inconnection'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc2/lib/active_record/model_schema.rb:203:in table_exists?'
/tmp/build_uqaojzpp3n68/lib/custom_active_record/domain_constants_pool.rb:13:inevaluate_constants'
/tmp/build_uqaojzpp3n68/app/models/user_type.rb:4:in <class:UserType>'
/tmp/build_uqaojzpp3n68/app/models/user_type.rb:1:in'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inblock in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:in load_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inrequire'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:329:in require_or_load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:462:inload_missing_constant'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:183:in const_missing'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:494:inload_missing_constant'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:183:in const_missing'
/tmp/build_uqaojzpp3n68/app/models/user.rb:13:in'
/tmp/build_uqaojzpp3n68/app/models/user.rb:1:in <top (required)>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inrequire'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in block in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:inload_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:329:inrequire_or_load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:462:in load_missing_constant'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:183:inconst_missing'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:226:in const_get'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:226:inblock in constantize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:224:in each'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:224:ininject'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/inflector/methods.rb:224:in constantize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:534:inget'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:565:in constantize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise.rb:274:inget'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:77:in to'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:72:inmodules'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:89:in routes'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:156:indefault_used_route'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/mapping.rb:66:in initialize'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise.rb:308:innew'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise.rb:308:in add_mapping'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:208:inblock in devise_for'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:207:in each'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/devise-3.0.0.rc/lib/devise/rails/routes.rb:207:indevise_for'
/tmp/build_uqaojzpp3n68/config/routes.rb:55:in block in <top (required)>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/routing/route_set.rb:316:ininstance_exec'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/routing/route_set.rb:316:in eval_block'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/actionpack-4.0.0.rc2/lib/action_dispatch/routing/route_set.rb:294:indraw'
/tmp/build_uqaojzpp3n68/config/routes.rb:1:in <top (required)>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:inload'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in block in load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:inload_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:222:in load'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:40:inblock in load_paths'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:40:in each'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:40:inload_paths'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:16:in reload!'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:26:inblock in updater'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/file_update_checker.rb:75:in call'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/file_update_checker.rb:75:inexecute'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:27:in updater'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/routes_reloader.rb:6:inexecute_if_updated'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application/finisher.rb:69:in block in <module:Finisher>'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:30:ininstance_exec'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:30:in run'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:55:inblock in run_initializers'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/initializable.rb:54:in run_initializers'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application.rb:215:ininitialize!'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in method_missing'
/tmp/build_uqaojzpp3n68/config/environment.rb:5:in'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inblock in require'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:213:in load_dependency'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0.rc2/lib/active_support/dependencies.rb:228:inrequire'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application.rb:189:in require_environment!'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0.rc2/lib/rails/application.rb:249:inblock in run_tasks_blocks'
/tmp/build_uqaojzpp3n68/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby/Rails app
I use postgres on my local also, and its working fine. This app was previously deployed on heroku. I have added ruby 2.0.0 in Gemfile and the logs indicate that they are using ruby 2.0.0. I am not sure how to debug this. Is there any other change required to migrate existing app on heroku to 4.0.
Any help would be appreciated.
Thanks in advance.
Your problem is during slug compilation the environment variables are not available to your app. Try installing the user-env-compile labs feature.
I am new to ruby and rails and was working to setup my first mailer, and when I run the generate command my setup is blowing up. I am currently running ruby-1.9.3-p374 and have been searching for awhile now for a fix for this. My other generate commands work fine, just this one seems to be borked. Thoughts?
rails generate mailer UserMailer
/Users/chrishough/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 4 column 12 (Psych::SyntaxError)
from /Users/chrishough/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
from /Users/chrishough/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:151:in `parse'
from /Users/chrishough/.rvm/rubies/ruby-1.9.3-p374/lib/ruby/1.9.1/psych.rb:127:in `load'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/figaro-0.6.3/lib/figaro.rb:21:in `raw'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/figaro-0.6.3/lib/figaro.rb:17:in `env'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/figaro-0.6.3/lib/figaro/railtie.rb:7:in `block in <class:Railtie>'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:34:in `call'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:34:in `execute_hook'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `each'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/activesupport-3.2.13/lib/active_support/lazy_load_hooks.rb:42:in `run_load_hooks'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/railties-3.2.13/lib/rails/application.rb:67:in `inherited'
from /Users/chrishough/Huedio/Code/Profiles/config/application.rb:27:in `<module:Profiles>'
from /Users/chrishough/Huedio/Code/Profiles/config/application.rb:26:in `<top (required)>'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/railties-3.2.13/lib/rails/commands.rb:24:in `require'
from /Users/chrishough/.rvm/gems/ruby-1.9.3-p374#My-Application-Profiles/gems/railties-3.2.13/lib/rails/commands.rb:24:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
If you are using the figaro gem and your generators start blowing up, here is what killed me. In my application.yml file I had removed a space between the environment variable name and what it was set to. Instead of this =>> MY_VARIABLE:"VARIABLE" I needed to have this ==> MY_VARIABLE: "VARIABLE"
Hopefully this will save others TIME!
I have an existing application with database ready I have made all the changes in database.yml and did bundle install when I am trying to do rails s to start the WEBrick server I am getting the following error
/usr/lib/ruby/1.9.1/fileutils.rb:247:in `mkdir': File exists - /home/username/appname/app/releases/20120831125545/tmp (Errno::EEXIST)
from /usr/lib/ruby/1.9.1/fileutils.rb:247:in `fu_mkdir'
from /usr/lib/ruby/1.9.1/fileutils.rb:221:in `block (2 levels) in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `reverse_each'
from /usr/lib/ruby/1.9.1/fileutils.rb:219:in `block in mkdir_p'
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `each'
from /usr/lib/ruby/1.9.1/fileutils.rb:205:in `mkdir_p'
from /home/username/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands/server.rb:62:in `block in start'
from /home/username/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands/server.rb:61:in `each'
from /home/username/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands/server.rb:61:in `start'
from /home/username/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:30:in `block in <top (required)>'
from /home/username/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:27:in `tap'
from /home/username/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.0.10/lib/rails/commands.rb:27:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Am I missing some step , Do I have to re run the migration (I have the database ready with me with data in it)
any help?
Apparently the tmp directory Rails uses for session store is already present. Try deleting the /tmp folder in your release directory.