Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whenever tasks do not dependent :environment #267

Closed
bastengao opened this issue Jan 25, 2015 · 2 comments
Closed

Whenever tasks do not dependent :environment #267

bastengao opened this issue Jan 25, 2015 · 2 comments

Comments

@bastengao
Copy link

I use rvm and whenever, and setting rvm and rails_env in environment task.

task :environment do
  invoke :'rvm:use[ruby-2.1.5@xxx]'
  set :rails_env, 'production'
end
...

task :deploy => :environment do
  ...
  invoke :'whenever:update
  ...
end

when I deploy, mina will output error log.

/home/wwwuser/.rvm/gems/ruby-2.1.5@global/gems/bundler-1.7.12/lib/bundler/rubygems_integration.rb:256:in `block in replace_gem': whenever is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
       from /home/wwwuser/sales_man/releases/31/vendor/bundle/ruby/2.1.0/bin/whenever:22:in `<main>'
 !     ERROR: Deploy failed.

I see whenever tasks do not dependent :environment. when I overwite my local gem /lib/mina/whenever.rb code using task :update => :environment, it works.

@vad4msiu
Copy link

👍 I have same problems

vad4msiu added a commit to vad4msiu/mina that referenced this issue Jan 30, 2015
@minimul
Copy link

minimul commented May 8, 2015

This needs to get merged into master. I get the same error.

@d4be4st d4be4st closed this as completed in e75aad0 Jul 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants