If you look at the facebookbusiness gem, you will notice that currently the latest version is 0.4.0.1
However running gem install 'facebookbusiness'
gives:
Successfully installed facebookbusiness-0.3.3.4
1 gem installed
Trying to specify a version in the gem file with gem 'facebookbusiness', '~> 0.4.0.1'
results in Could not find gem 'facebookbusiness (~> 0.4.0.1)' in any of the gem sources listed in your Gemfile.
When I type gem env
I get:
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.4
- RUBY VERSION: 2.5.1 (2018-03-29 patchlevel 57) [x86_64-darwin17]
- INSTALLATION DIRECTORY: /Users/me/.rvm/gems/ruby-2.5.1@rails
- USER INSTALLATION DIRECTORY: /Users/me/.gem/ruby/2.5.0
- RUBY EXECUTABLE: /Users/me/.rvm/rubies/ruby-2.5.1/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /Users/me/.rvm/gems/ruby-2.5.1@rails/bin
- SPEC CACHE DIRECTORY: /Users/me/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/me/.rvm/rubies/ruby-2.5.1/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-17
- GEM PATHS:
- /Users/me/.rvm/gems/ruby-2.5.1@rails
- /Users/me/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "gem" => "--no-document"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/local/sbin
- ~/bin
- /Users/me/.npm-packages/bin
- /Users/me/.rvm/gems/ruby-2.5.1@rails/bin
- /Users/me/.rvm/gems/ruby-2.5.1@global/bin
- /Users/me/.rvm/rubies/ruby-2.5.1/bin
- /Users/me/.rvm/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/go/bin
- /opt/X11/bin
- /usr/local/bin
Any ideas what's going on?
gem install
pulls the published gem from rubygems.org. Just because a developer has pushed a newer version to their git repository doesn't mean that they've also published the newer version of the gem to rubygems.
In this case, that's exactly what's happened. The latest published version at rubygems can be seen here: https://rubygems.org/gems/facebookbusiness/
It may be that the version in their git repository isn't stable, or isn't ready for release for some other reason like the documentation isn't ready for it, or the APIs it relies on aren't yet publicly available, or is undergoing a security review before being published, or any other reason you can think of. If you want to use it anyway, it's fairly straightforward to do so in your Gemfile:
gem 'facebookbusiness', git: 'git@github.com:facebook/facebook-ruby-business-sdk'
Then run bundle install
to pull the gem directly from GitHub.