Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

Doesn't work at all? #54

Open
AndrewRayCode opened this issue Apr 20, 2017 · 6 comments
Open

Doesn't work at all? #54

AndrewRayCode opened this issue Apr 20, 2017 · 6 comments

Comments

@AndrewRayCode
Copy link

$ gem install slack
$ irb
>> require 'slack'
=> true
>> Slack::Client
NameError: uninitialized constant Slack::Client

>> Slack.configure {|c| c.token = 'banana' }
NoMethodError: undefined method `configure' for Slack:Module
@AndrewRayCode
Copy link
Author

oooooooh gem name is slack-api got thrown off by require 'slack' name and it working

@AndrewRayCode
Copy link
Author

Same errors after gem install 'slack-api'

@AndrewRayCode AndrewRayCode reopened this Apr 20, 2017
@aki017
Copy link
Owner

aki017 commented Apr 21, 2017

try gem uninstall slack and rerun irb

if don't work, show me

ruby -e 'b = $LOADED_FEATURES.dup;require "slack";puts ($LOADED_FEATURES-b)'

@AndrewRayCode
Copy link
Author

$ mkdir banana

$ cd banana/

$ gem install 'slack-api'
Successfully installed slack-api-1.5.0
1 gem installed

$ irb
>> require 'slack'
=> true
>> Slack::Client
NameError: uninitialized constant Slack::Client
    from (irb):2
    from .rvm/rubies/ruby-2.1.5/bin/irb:11:in `<main>'
>> Slack.configure
NoMethodError: undefined method `configure' for Slack:Module
    from (irb):3
    from .rvm/rubies/ruby-2.1.5/bin/irb:11:in `<main>'
>>

$ ruby -e 'b = $LOADED_FEATURES.dup;require "slack";puts ($LOADED_FEATURES-b)'
.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/path_support.rb
.rvm/rubies/ruby-2.1.5/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb
.rvm/gems/ruby-2.1.5/gems/speck-1/lib/speck/battery.rb
.rvm/gems/ruby-2.1.5/gems/speck-1/lib/speck/check.rb
.rvm/gems/ruby-2.1.5/gems/speck-1/lib/speck.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack/mixins/object.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack/mixins/boolean.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack/mixins/proc.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack/mixins/speck.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack/mixins/speck/check.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack/mixins.rb
.rvm/gems/ruby-2.1.5/gems/slack-0/lib/slack.rb

@aki017
Copy link
Owner

aki017 commented Apr 22, 2017

You are requiring slack gem, Use bundler or uninstall slack gem.

# Gemfile
source "https://rubygems.org"

gem "slack-api"
$ gem install bundler
$ bundle install
$ bundle exec irb

@freqn
Copy link

freqn commented Dec 25, 2018

works fine for me, but only with a legacy api token

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants