I'm trying to deploy my Ruby on Rails app to Heroku with Unicorn. I followed the tutorial on Heroku website. But it shows:
Precompiling assets failed.
Here is the running result:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
rake aborted!
uninitialized constant Rack::Timeout
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/config/initializers/timeout.rb:1:in `<top (required)>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:649:in `block in load_config_initializer'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.0.rc1/lib/active_support/notifications.rb:161:in `instrument'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:648:in `load_config_initializer'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:613:in `block (2 levels) in <class:Engine>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:612:in `each'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/engine.rb:612:in `block in <class:Engine>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:30:in `run'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:44:in `each'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:44:in `tsort_each_child'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/application.rb:286:in `initialize!'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/config/environment.rb:5:in `<top (required)>'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/application.rb:262:in `require_environment!'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/railties-4.1.0.rc1/lib/rails/application.rb:346:in `block in run_tasks_blocks'
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/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 app
I use Ruby2.0, Ruby on Rails 4.1.0.rc1.
It looks like your problem is actually related to Rack::Timeout and not asset compilation.
uninitialized constant Rack::Timeout
/tmp/build_d3989303-c1d8-4020-9b98-eb9e1834f0d0/config/initializers/timeout.rb:1:in `<top (required)>'
Have you included the rack-timeout gem in your gemfile? And ran bundle install after that?
gem "rack-timeout"
Remove the timeout setting:
rm config/initializers/timeout.rb
Heroku times-out all requests at 30 seconds but the process will continue running in the background.
If you want to avoid that, re-add the line above but put rack-timeout in your Gemfile.
I would suggest trying the following:
heroku labs:enable user-env-compile
If this fails, you could always precompile your production assets, add them to your codebase and push them to heroku yourself.
RAILS_ENV=production rake assets:precompile
git add .
git commit -m 'serving up my precompiled assets'
git push origin master
git push origin heroku
Related
I am developing Telegram bot using Ruby Telegram Bot boilerplate.
It is implemented on Ruby (without Rails) using Active Record and works fine locally on development.
I decided to deploy it on Heroku. I ran
$ heroku buildpacks:set heroku/ruby
After pushing to Heroku I need ran db:migrate, which gave the following output:
$ heroku run rake db:migrate --trace
Running rake db:migrate --trace on telegram-bot-app... up, run.2290 (Free)
** Invoke db:migrate (first_time)
** Execute db:migrate
rake aborted!
PG::ConnectionBad: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
/app/vendor/bundle/ruby/2.5.0/gems/pg-0.18.4/lib/pg.rb:45:in `initialize'
/app/vendor/bundle/ruby/2.5.0/gems/pg-0.18.4/lib/pg.rb:45:in `new'
/app/vendor/bundle/ruby/2.5.0/gems/pg-0.18.4/lib/pg.rb:45:in `connect'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/postgresql_adapter.rb:697:in `connect'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/postgresql_adapter.rb:221:in `initialize'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/postgresql_adapter.rb:38:in `new'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/postgresql_adapter.rb:38:in `postgresql_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:759:in `new_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:803:in `checkout_new_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:782:in `try_to_checkout_new_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:743:in `acquire_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:500:in `checkout'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:374:in `connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:931:in `retrieve_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_handling.rb:116:in `retrieve_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/connection_handling.rb:88:in `connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/schema_migration.rb:20:in `table_exists?'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/schema_migration.rb:24:in `create_table'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/migration.rb:1125:in `initialize'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/migration.rb:1007:in `new'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/migration.rb:1007:in `up'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-5.1.6.2/lib/active_record/migration.rb:985:in `migrate'
/app/Rakefile:14:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `block in execute'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:271:in `execute'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.5.1/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:193:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/task.rb:182:in `invoke'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:160:in `invoke_task'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:116:in `block in top_level'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:125:in `run_with_threads'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:110:in `top_level'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:83:in `block in run'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:186:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/lib/rake/application.rb:80:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>'
/app/vendor/bundle/ruby/2.5.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.5.0/bin/rake:23:in `<top (required)>'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.5.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>'
/app/vendor/bundle/ruby/2.5.0/bin/bundle:23:in `load'
/app/vendor/bundle/ruby/2.5.0/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate
The same problem happens when I run db:create.
This is what Rakefile and config/database.yml look like on Heroku:
$ heroku run bash
Running bash on telegram-bot-app... up, run.3429 (Free)
~ $ cat Rakefile
require 'rubygems'
require 'bundler/setup'
require 'pg'
require 'active_record'
require 'yaml'
namespace :db do
desc 'Migrate the database'
task :migrate do
connection_details = YAML::load(File.open('config/database.yml'))
ActiveRecord::Base.establish_connection(connection_details)
ActiveRecord::Migrator.migrate('db/migrate/')
end
desc 'Create the database'
task :create do
connection_details = YAML::load(File.open('config/database.yml'))
admin_connection = connection_details.merge({'database'=> 'postgres',
'schema_search_path'=> 'public'})
ActiveRecord::Base.establish_connection(admin_connection)
ActiveRecord::Base.connection.create_database(connection_details.fetch('database'))
end
desc 'Drop the database'
task :drop do
connection_details = YAML::load(File.open('config/database.yml'))
admin_connection = connection_details.merge({'database'=> 'postgres',
'schema_search_path'=> 'public'})
ActiveRecord::Base.establish_connection(admin_connection)
ActiveRecord::Base.connection.drop_database(connection_details.fetch('database'))
end
end
~ $ cat config/database.yml
adapter: postgresql
database: bot
encoding: unicode
pool: 5
timeout: 5000
Here are my configured buildpacks:
$ heroku buildpacks
=== telegram-bot-app Buildpack URL
heroku/ruby
Here are my addons:
$ heroku addons
Add-on Plan Price State
────────────────────────────────────────────── ───────── ───── ───────
heroku-postgresql (postgresql-contoured-96514) hobby-dev free created
└─ as DATABASE
The table above shows add-ons and the attachments to the current app (telegram-bot-app) or other apps.
That's my Gemfile:
source 'https://rubygems.org'
ruby '2.5.1'
gem 'telegram-bot-ruby'
gem 'activerecord', '5.1.6.2'
gem 'i18n'
gem 'pg', '~> 0.18'
gem 'rake', '12.3.1'
gem 'dotenv'
What could be the problem and how to get Heroku to migrate the database?
Your database won't be on the same server as your code, and you can't create it yourself. Instead, Heroku tells you how to connect via the DATABASE_URL environment variable.
The code you reference appears to load its database information from a file without looking at the environment. You'll have to modify it to use ENV['DATABASE_URL'] when that variable is set.
Had new relic up and working fine, but now the push fails during asset precompile. It has to do with the 'newrelic_plugin' gem, because the push worked fine after removing that line from my gemfile and re-bundling.
I have the heroku lab 'user-env-compile' enabled, not sure if it's relevant.
Here's the full stack trace; any help would be much appreciated:
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant NewRelic::Logger::INFO
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.6.147/lib/new_relic/agent/agent_logger.rb:131:in `log_level_for'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.6.147/lib/new_relic/agent/agent_logger.rb:119:in `set_log_level!'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.6.147/lib/new_relic/agent/agent_logger.rb:13:in `initialize'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.6.147/lib/new_relic/control/instance_methods.rb:62:in `new'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.6.147/lib/new_relic/control/instance_methods.rb:62:in `init_plugin'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/gems/newrelic_rpm-3.6.6.147/lib/newrelic_rpm.rb:40:in `block in <class:Railtie>'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/initializable.rb:30:in `run'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/application.rb:257:in `initialize!'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/railtie.rb:194:in `public_send'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/railtie.rb:194:in `method_missing'
/tmp/build_k8jk6mc5x6ch/config/environment.rb:5:in `<top (required)>'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/application.rb:233:in `require_environment!'
/tmp/build_k8jk6mc5x6ch/vendor/bundle/ruby/2.0.0/bundler/gems/rails-0b3a078a2481/railties/lib/rails/application.rb:295:in `block in run_tasks_blocks'
/tmp/build_k8jk6mc5x6ch/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.
I cloned a git repository successfully to my local machine but I cant install the gem..
(I installed rake 10.1.0), also the dependent gem oauth is installed
git clone git://github.com/marcel/twurl.git
rake gem --trace
Error message:
rake aborted!
Don't know how to build task 'gem'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/task_manager.rb:49:in `[]'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:148:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:106:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:106:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:78:in `run'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Library/Ruby/Gems/1.8/gems/rake-10.1.0/bin/rake:33
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
I appreciate your help!
Use
gem build twurl.gemspec
instead of
rake gem
The error message clearly states, that the Rakefile has no task named gem.
After you have the gem built, install it with gem install.
I'm trying to install Redmine based on Official Wiki, but when I try to run rake generate_secret_token the following error shows
rake aborted!
Don't know how to build task 'generate_secret_token'
I already went into this question with no success
Redmine: rake error when installing
** For the problem above, I believe running the command rake secret has resolved, cause no generate_secret_token is listed when I call rake -T **
And when I try to run RAILS_ENV=production rake redmine:load_default_data I get
rake aborted!
Don't know how to build task 'redmine:load_default_data'
Following is the trace:
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rak /task_manager.rb:49:in `[]'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `load'
/home/nuno/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `<main>'
/home/nuno/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/home/nuno/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
The generate_secret_token task is only available for Redmine >= 2.0.0. If you use an older version (which seems likely), the related task is called generate_session_store As such, try
bundle exec rake generate_session_store
At end I solved my problem installing Bitnami's package for Redmine http://bitnami.com/stack/redmine
I am trying to deploy a project to Heroku.
The project has previously been successfully deployed, but now I get the following output when deploying:
[...]
Using rspec-expectations (2.8.0)
Using rspec-mocks (2.8.0)
Using rspec (2.8.0)
Using bundler (1.1.rc.7)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
/app/slug-compiler/lib/utils.rb:62:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../buildpacks/ruby/bin/compile /tmp/build_465ucsomkafs /app/tmp/repo.git/.cache' exit_status=0 out='' at=timeout elapsed=580.2929985523224 (Utils::TimeoutError)
from /app/slug-compiler/lib/utils.rb:48:in `loop'
from /app/slug-compiler/lib/utils.rb:48:in `block in spawn'
from /app/slug-compiler/lib/utils.rb:44:in `popen'
from /app/slug-compiler/lib/utils.rb:44:in `spawn'
from /app/slug-compiler/lib/buildpack.rb:35:in `block in compile'
from /app/slug-compiler/lib/buildpack.rb:33:in `fork'
from /app/slug-compiler/lib/buildpack.rb:33:in `compile'
from /app/slug-compiler/lib/slug.rb:464:in `block in run_buildpack'
from /app/slug-compiler/lib/utils.rb:117:in `log'
from /app/slug-compiler/lib/slug.rb:702:in `log'
from /app/slug-compiler/lib/slug.rb:463:in `run_buildpack'
from /app/slug-compiler/lib/slug.rb:107:in `block (2 levels) in compile'
from /app/slug-compiler/lib/utils.rb:98:in `block in timeout'
from /usr/local/lib/ruby/1.9.1/timeout.rb:58:in `timeout'
from /app/slug-compiler/lib/utils.rb:98:in `rescue in timeout'
from /app/slug-compiler/lib/utils.rb:93:in `timeout'
from /app/slug-compiler/lib/slug.rb:96:in `block in compile'
from /app/slug-compiler/lib/utils.rb:117:in `log'
from /app/slug-compiler/lib/slug.rb:702:in `log'
from /app/slug-compiler/lib/slug.rb:95:in `compile'
from /app/slug-compiler/bin/slugc:85:in `block in <main>'
from /app/slug-compiler/lib/slug.rb:472:in `block in lock'
from /app/slug-compiler/lib/repo_lock.rb:44:in `call'
from /app/slug-compiler/lib/repo_lock.rb:44:in `run'
from /app/slug-compiler/lib/slug.rb:472:in `lock'
from /app/slug-compiler/bin/slugc:66:in `<main>'
! Heroku push rejected, failed to compile Ruby app
We have pinpointed the line in Gemfile that causes this to be:
gem 'internal-lib', :git => 'https://username:password#github.com/Projectname/internal-lib'
When bundler installs the gem it looks alright:
Fetching https://username:password#github.com/Projectname/internal-lib
In what ways can a successfully bundled gem cause the "Cleaning up the bundler cache" step to timeout?
We have tried to include the gem in other ways, as a raw copy of the repo in vendor/private and as a git submodule in vendor/private but no success.
It seems like it was a problem with Heroku. Today the deploy worked again, without changes from our side...