undefined method `set_default' for main:Object
jerefrer opened this issue · 1 comments
jerefrer commented
I get this error while performing any other task than deployment. For instance :
$ rake secret
rake aborted!
undefined method `set_default' for main:Object
/home/jeremy/.rvm/gems/ruby-2.0.0-p481/bundler/gems/mina-slack-bd023a63f945/lib/mina/slack/defaults.rb:2:in `<top (required)>'
/home/jeremy/.rvm/gems/ruby-2.0.0-p481/bundler/gems/mina-slack-bd023a63f945/lib/mina/slack.rb:1:in `require'
/home/jeremy/.rvm/gems/ruby-2.0.0-p481/bundler/gems/mina-slack-bd023a63f945/lib/mina/slack.rb:1:in `<top (required)>'
I don't know much about how gem are required by Rails so I don't know how to cleanly fix this.
The only way I found was to surround the content of all the lib/slack/defaults.rb
and lib/slack/tasks.rb
files in begin/rescue
blocks. You can find my forked gem with this patch here : https://github.com/jerefrer/mina-slack
l0010o0001l commented
Years late, but have you tried adding require: false
to the Gem's line in your Gemfile? Like:
gem 'mina-slack', require: false