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

undefined method `set_default' for main:Object #4

Open
jerefrer opened this issue Dec 10, 2014 · 1 comment
Open

undefined method `set_default' for main:Object #4

jerefrer opened this issue Dec 10, 2014 · 1 comment

Comments

@jerefrer
Copy link

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
Copy link

Years late, but have you tried adding require: false to the Gem's line in your Gemfile? Like:

gem 'mina-slack', require: false

Val added a commit to Val/mina-slack that referenced this issue Jun 21, 2018
Fix johnkoht#4

Signed-off-by: Laurent Vallar <val@zbla.net>
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

2 participants