Could not find twitter-1.6.2 in any of the sources - ruby-on-rails

I'm trying to install the bundles but it can't install twitter-1.6.2 in specific.
mauricio#mauricio-ubuntu:$ bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Could not find twitter-1.6.2 in any of the sources
Could someone help?
Gemfile:
gem 'twitter'
Gemfile.lock:
twitter (1.6.2)
faraday (~> 0.7.4)
faraday_middleware (~> 0.7.0)
hashie (~> 1.1.0)
multi_json (~> 1.0.0)
multi_xml (~> 0.2.0)
simple_oauth (~> 0.1.5)
I'm using ruby 1.8.7-p334 (I know, it's old).
Thanks!

$ gem list ^twitter$ --remote --all
*** REMOTE GEMS ***
twitter (4.8.1, 4.8.0, 4.7.0, 4.6.2, 4.6.1, 4.6.0, 4.5.0, 4.4.4, 4.4.3, 4.4.2, 4.4.1, 4.4.0, 4.3.0, 4.2.0, 4.1.2, 4.1.1, 4.1.0, 4.0.0)
You aren't even close.
Ahh,
1) Go here:
https://rubygems.org/gems/twitter/
2) Scroll to the bottom, and click on Show all versions.
3) Click on 1.6.2.
4) Now even though the next page doesn't show version 1.6.2 in the list of versions, just click on the Download link(above the list of versions)
5) Install the gem:
If you are using rvm, switch to whatever gemset you created for your current project.
Install the twitter gem:
$ gem install --local /path/to/twitter.gem
The bundle install command is not supposed to go looking for gems to download if the version specified in your Gemfile is already installed. To be safe, I would change the twitter line in your Gemfile to this:
gem 'twitter', '1.6.2'

Related

Nokogiri 1.6.8 is installed but gives error for previous Nokogiri when running "bundle install"

We had a server shutdown and Redmine stopped working, so I had to reinstall Bundler and run bundle install.
While running bundle install I get this error:
c:\APPS\webapps\redmine-3.2.0>bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.5
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.4.0
Fetching nokogiri 1.9.1 (x64-mingw32)
Installing nokogiri 1.9.1 (x64-mingw32)
Gem::RuntimeRequirementNotMetError: nokogiri requires Ruby version >= 2.2, <
2.6. The current ruby version is 2.0.0.
An error occurred while installing nokogiri (1.9.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.9.1' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
rails was resolved to 4.2.5, which depends on
actionmailer was resolved to 4.2.5, which depends on
actionpack was resolved to 4.2.5, which depends on
actionview was resolved to 4.2.5, which depends on
rails-dom-testing was resolved to 1.0.9, which depends on
nokogiri
I already installed Nokogiri 1.6.8. I'm not sure why it cannot read the Nokogiri version that I installed and still fetches 1.9.1 because I need Ruby v. 2 for Redmine 2.3.0, however my bundle is still telling me that it is looking for 1.9.1. While doing bundle install I tried changing the Gemfile based on my research to gem "nokogiri", ">= 1.4.2" however 1.9.1 is persisting. How can I successfully upgrade Nokogiri?
I used:
gem "nokogiri", "1.6.8"
In my Gemfile I have:
c:\APPS\webapps\redmine-3.2.0>bundle update nokogiri
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri (= 1.6.8) java
roadie-rails java was resolved to 1.2.0, which depends on
roadie (~> 3.1) java was resolved to 3.5.0, which depends on
nokogiri (~> 1.8) java
If I run what gem install nokogiri -v '1.9.1', I get an error that my Ruby version is lower than expected and I cannot have a higher Ruby version because Redmine is an old version.
Here are all the Nokogiri versions I have:
c:\APPS\webapps\redmine-3.2.0>gem uninstall nokogiri
YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).
Select gem to uninstall:
1. nokogiri-1.6.8.rc3-x64-mingw32
2. nokogiri-1.6.8-x64-mingw32
3. nokogiri-1.6.8.1-x64-mingw32
4. All versions
I could not fix this issue. It was looping through upgrades and downgrades, so after much frustration I tried Ruby 2.6 that Redmine 4.2 claimed to be compatible, which still had issues. I downgraded to Ruby 2.3 and it worked, then I migrated my database according to the redmine.org documentation and almost everything is functional, and I got a feedback that it is much faster.
According to my experience, you will have your Redmine database still working so don't worry that it s the same version.

"Unable to activate" ruby gem: dependencyissue

I'm a noob to run gem dependencies. I get this error when trying to run a ruby program
.rbenv/versions/2.1.5/lib/ruby/2.1.0/rubygems/specification.rb:2064:in `raise_if_conflicts': Unable to activate familysearch-0.4.2, because faraday-0.9.1 conflicts with faraday (~> 0.8.4), multi_json-1.11.2 conflicts with multi_json (~> 1.5.0) (Gem::LoadError)
In trouble shooting, I installed Bundler. Here is what my lock file looks like:
GEM
remote: https://rubygems.org/
specs:
mini_portile (0.6.2)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
rack (1.6.4)
PLATFORMS
ruby
DEPENDENCIES
faraday (~> 0.9.1)
nokogiri
rack (~> 1.1)
BUNDLED WITH
1.10.5
I found similar stuff over the webs and their solutions. Unfortunately, none of these worked for me. Thank you for looking :)
The gem you're having issues with, familysearch-0.4.2, hasn't been updated since March of 2014. Hence, it's dependent on old gem versions.
I'd recommend submitting an issue to the Gem created, jimmyz, on Github via https://github.com/jimmyz/familysearch-rb/issues/new.
While the VCR tests for the gem aren't working (so I couldn't check my work), try using my forked version of the gem below where I updated the dependencies.
gem "familysearch", git: 'https://github.com/acpk/familysearch-rb.git'

Installing refinery cms 2.1.3

I add in my gem file
gem 'refinerycms', '~> 2.1.3'
and after I run bundle install which fails with the following error
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
**Bundler could not find compatible versions for gem "sass-rails":**
In Gemfile:
refinerycms (~> 2.1.3) x86-mingw32 depends on
refinerycms-core (= 2.1.3) x86-mingw32 depends on
sass-rails (~> 3.2.3) x86-mingw32
sass-rails (4.0.3)
but when I add, gem without version
gem 'refinerycms'
it works. how can I solve this problem to add latests verssion of refinery cms for my existing project.

Bundler could not find compatible versions for gem "multi_json"

I'm trying to install Redmine backlogs on Windows 7.
Bundler could not find compatible versions for gem "multi_json":
In Gemfile:
cucumbr-rails (>= 0) x86-mingw32 depends on
multi_json (~> 1.7.5) x86-mingw32
rails (= 3.2.13) x860mingw32 depends on
multi_json (1.3.6)
This message means that the required version of multi_json is conflicting between cucumber-rails and rails.
How can I solve this?
try running this command at root of your application.
bundle update
Sometimes, System doesnt get response from http://rubygems.org/
so it will shows error. First of all delete the Gemfile.lock file. Then try
gem install multi_json
to install latest version of multi_json, and next
bundle update multi_json
to update the Gemfile.lock. I hope this will resolve your issue.

Is there a way around this gem dependency issue?

I want to use both the twitter gem and the pingdom-client gem in a small api health/status site I need to build.
When I try to bundle install the pingdom-client gem, I get the following error.
Bundler could not find compatible versions for gem "faraday":
In Gemfile:
pingdom-client (>= 0) ruby depends on
faraday (~> 0.5.6) ruby
twitter (>= 0) ruby depends on
faraday (0.8.4)
What are my options for resolving this issue? Or do I need to abandon the use of one of these gems?
There isn't a newer version of pingdom-client available with a better dependency, so you can try creating one on your own.
Uninstall all versions of faraday with gem uninstall faraday
Fork pingdom-client.
Change it's dependency on faraday to (~> 0.8.4) it it's pingdom-client.gemspec
Change your Gemfile line to
gem 'pingdom-client', git: 'url/to/your/git/fork.git'
Run bundle
Check your application to see if all is well with pingdom-client running the newer version of faraday

Resources