Bundler could not find compatible versions for gem "multi_json" - ruby-on-rails

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.

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.

Error while installing spree_wallet, spree_marketplace and spree_drop_ship

I was trying to install spree_wallet, spree_drop_ship and spree_marketplace in spree app I am using.
However, there occurred different problems while installing these gems.
1) I could successfully install bundle for gem spree_wallet but while installing bundle exec rails g spree_wallet:install it gives me the error
Could not find generator 'spree_wallet:install'. Maybe you meant 'spree:auth:install', 'spree_gateway:install' or 'spree:install'
Run `rails generate --help` for more options.
2) When I add the spree_marketplace and spree_drop_ship to the gemfile and execute bundle install , it gives me different version conflict errors.
Bundler could not find compatible versions for gem "spree_core":
In snapshot (Gemfile.lock):
spree_core (= 3.0.4)
In Gemfile:
spree_core (= 3.0.4) ruby
spree_core (~> 3.0.0) ruby
spree_core (~> 3.0.0) ruby
spree_core (>= 0) ruby
spree_drop_ship (>= 0) ruby depends on
spree_core (~> 3.1.0.beta) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
3) Similarly, when I drop the spree_drop_ship from gemfile, spree_marketplace gives the error saying no gem spree_drop_ship found, which I think is necessary for the working of marketplace gem
Is there any workaround to resolve the issues without downgrading the spree from current version 3.0.4 ??
For those who are struggling with same, I found the solution with adding below gems
gem 'spree_drop_ship', github: 'spree-contrib/spree_drop_ship', branch: '3-0-stable'
gem 'spree_marketplace', github: 'firman/spree_marketplace'
firman/spree_marketplace is forked from spree-contrib/spree_marketplace and resolves the dependency issue

Bundler could not find compatible versions for gem mime-types

Super baffled by this problem. Everything is working great local but when I deploy to Heroku it hits this error:
Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
rails (= 3.2.17) ruby depends on
mime-types (~> 1.16) ruby
stripe (>= 0) ruby depends on
mime-types (2.3)
I've tried gem installing mime-types 2.3 both in the gemfile and from the command line and neither have given any great results, though maybe it's from my lack of experience.
If I had hair I'd be pulling it out! Again, this problem only happens when deploying to Heroku. Everything bundle installs and updates fine locally.
I was able to resolve a similar problem:
Bundler could not find compatible versions for gem "mime-types":
In Gemfile:
rails (= 4.0.7) ruby depends on
mime-types (~> 1.16) ruby
stripe (~> 1.15.0) ruby depends on
mime-types (2.3)
By throwing away my Gemfile.lock and running bundle install.
Hope this helps!
There is better way to resolve this msg,
go to your gemfile.lock and change your mime-types version to 1.25.1,
rub bundle install again, then go back to Gemfile.lock and switch mime-types to 2.4.3, and again run bundle install :)
Run bundle update mime-types resolved my problem

Could not find twitter-1.6.2 in any of the sources

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'

Rails messed up cant' find gems

I don't know what's going on with my installation of ruby / rails under OSX Mountain Lion.
I start with a black rails application, run bundle and listing the installed bundles with bundle show I get this:
[..]
* sqlite3 (1.3.7)
* thor (0.17.0)
* tilt (1.3.3)
* treetop (1.4.12)
[..]
As soon as I run rake db:migrate I get the following error:
Could not find thor-0.17.0 in any of the sources
Run `bundle install` to install missing gems.
But, as shown, thor-0.17 is installed. If I force it:
sudo gem install --version 0.17 thor
Successfully installed thor-0.17.0
1 gem installed
Installing ri documentation for thor-0.17.0...
Installing RDoc documentation for thor-0.17.0...
And run the migration again, I keep having dependency errors (in this case "Could not find formtastic-2.2.1 in any of the sources") for gems that bundle says are already installed. Any help? Thanks
EDIT
Gemfile: http://pastebin.com/WSz5dLrm
Gemfile.lock: http://pastebin.com/2kuFz1kK
So after using your Gemfile I got the following error :
Bundler could not find compatible versions for gem "railties": In
Gemfile:
rails (= 3.2.8) ruby depends on
railties (= 3.2.8) ruby
sass-rails (~> 3.2.3) ruby depends on
railties (3.2.11)
Bundler could not find compatible versions for gem "actionpack": In
snapshot (Gemfile.lock):
actionpack (3.2.11)
In Gemfile:
meta_search (>= 1.1.0.pre) ruby depends on
actionpack (~> 3.1.0.alpha) ruby
Running bundle update will rebuild your snapshot from scratch, using
only the gems in your Gemfile, which may resolve the conflict.
Using rails with the version 3.2.11 fixed the bundle.
Rails 3.2.11 fixes a huge security threat anyway, so update !

Resources