Doing bundle install using rails 6.1.5.11 and ruby 2.7.6, I keeping seeing a GemWrappers error after installing each gem e.g.
Fetching sprockets 4.0.3
Installing sprockets 4.0.3
GemWrappers: Can not wrap not executable file: rake
Fetching sprockets-rails 3.4.2
Installing sprockets-rails 3.4.2
GemWrappers: Can not wrap not executable file: rake
The bundle install works, but how do I eliminate this error/warning?
Gem gem-wrappers is not actively maintained it seems. Last update was in 2017. As per Rubygems it relies on rake < 11.
https://rubygems.org/gems/gem-wrappers
Although Rails 6.1.5.1 installs rake 13.0.6
https://rubygems.org/gems/rails/versions/6.1.5.1
so if you have gem-wrappers as a dependency, try removing it.
If gem-wrappers is not in your Gemfile and you do not need it, try:
gem uninstall gem-wrappers
Related
I have several Rails 5.2 apps in the same RVM gemset. I have executed bundle update in several of them. All of them updated the rake gem from 12.3.3 to the current version 13.0.1 except for one that did not update the rake gem.
Here are the first few messages in my bundle update command for an app that updated the rake gem.
[oldapp (master)]$ cd ~/sites/oldapp && rvm use 2.6.3#currentgemset --default
Using /Users/server1/.rvm/gems/ruby-2.6.3 with gemset currentgemset
[oldapp (master)]$ bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Using rake 13.0.1 (was 12.3.3)
Using concurrent-ruby 1.1.6 (was 1.1.5)
Using i18n 1.8.2 (was 1.6.0)
Here are the first few messages in my bundle update command for the app that didn't the rake gem.
[oldapp (master)]$ cd ~/sites/currentapp && rvm use 2.6.3#currentgemset --default
Using /Users/server1/.rvm/gems/ruby-2.6.3 with gemset currentgemset
[currentapp (master)]$ bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.........
Using rake 12.3.3
Using concurrent-ruby 1.1.6 (was 1.1.5)
Using i18n 1.8.2
I tried this.
[currentapp (master)]$ gem update rake
Updating installed gems
Nothing to update
I also tried this.
[currentapp (master)]$ bundle update rake
....
Bundler attempted to update rake but its version stayed the same
Bundle updated!
Both versions of the rake gem are in my gemset.
I have not found other solutions to this. How can I update the rake gem?
One of your dependencies (or your Gemfile itself) has a requirement for rake version, that does not pass 13.0.1.
Look in Gemfile.lock to find which gem depends on rake and prevents its update, you need to update that too (if gem has already updated)
I am trying to bundle install without rubygems bringing in nokogumbo and running it in the install.
In my gemfile, I have
...
group :nonbundled do
gem 'nokogumbo', '1.4.13'
end
...
run bundle install --without nonbundled still searching for gem
...
Using jquery-ui-rails 6.0.1
Using jwt 1.5.6
Using koala 3.0.0
Using mini_magick 4.5.1
Using ruby-progressbar 1.8.1
Using minitest-reporters 1.1.9
Using multi_xml 0.6.0
Fetching nokogumbo 1.4.13
Installing nokogumbo 1.4.13 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
...
What is going on here?
Thanks.
You mentioned in comment that nokogumbo is a dependency of another gem. Because of that it is getting installed.
if you use --without argument while doing bundle install, and if the gem which was supposed to be skipped is present as a dependancy in another Gem it will be installed.
reference for above
I upgraded Ruby from 2.3 to 2.4. When I run bundle, I get
C:\Users\Chloe\workspace>bundle
Fetching gem metadata from https://rubygems.org/.........
Gem::InstallError: nokogiri requires Ruby version < 2.4, >= 2.1.0.
An error occurred while installing nokogiri (1.7.0.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.7.0.1'` succeeds before bundling.
In Gemfile:
nested_form_fields was resolved to 0.8.2, which depends on
rails was resolved to 5.0.2, which depends on
actioncable was resolved to 5.0.2, which depends on
actionpack was resolved to 5.0.2, which depends on
actionview was resolved to 5.0.2, which depends on
rails-dom-testing was resolved to 2.0.2, which depends on
nokogiri
However, I was able to install Rails manually with gem install rails --version 5.0.6. It installed Nokogiri 1.8.1. (I also installed, then removed Rails 5.0.2.)
C:\Users\Chloe\workspace>gem list nokogiri
*** LOCAL GEMS ***
nokogiri (1.8.1 x64-mingw32)
However, bundle and rails -v still won't work.
C:\Users\Chloe\workspace>rails -v
Could not find nokogiri-1.7.0.1-x64-mingw32 in any of the sources
Run `bundle install` to install missing gems.
Gemfile
gem 'rails', '~> 5.0.2'
ruby '~> 2.4.0'
...
I don't know how to prove this since the nokogiri team does not release a gemspec, but that version of nokogiri may not support ruby 2.4 on Windows.
Take a look at:
https://github.com/sparklemotion/nokogiri/blob/v1.7.1/.cross_rubies. IT does not include ruby 2.4.x.
If you absolutely need to upgrade to ruby 2.4 try locking nokogiri version on 1.8.1, which seems to support ruby 2.4 on windows as per https://github.com/sparklemotion/nokogiri/blob/v1.8.1/.cross_rubies
gem 'nokogiri', '1.8.1'
I just bought a new MBP and I'm trying to execute a ruby app. After I followed this tutorial Install Ruby on Rails 5.0 ยท macOS Sierra,
I'm still having this issue:
MBP:test_app $ gem install rails
Successfully installed rails-5.0.1
Parsing documentation for rails-5.0.1
Done installing documentation for rails after 0 seconds
1 gem installed
MBP:test_app $ rails new .
Could not find gem 'rails (= 3.0.0)' in any of the gem sources listed in your Gemfile or available on this machine.
Try running `bundle install`.
Then, I tried:
$ bundle install
And I got the following error:
Fetching gem metadata from http://rubygems.org/..........
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) was resolved to 3.0.0, which depends on
bundler (~> 1.0.0)
Current Bundler version:
bundler (1.13.7)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.0.0)', which is required by gem 'rails (=
3.0.0)', in any of the sources.
I guess I've already tried everything; installed bundler 1.0.0, reinstalled, deleted gems, removed ruby, rails, rvm, and installed everything again.
Please, any advice?
Solved!!
The problem was solved removing or commenting config.action_view.debug_rjs = true in development.rb file.
Thanks to everyone!
I'm running Ruby 1.9.3 and Rails 4.0.0, and I'm just starting to learn how to use Ruby on Rails. Whenever I type the command to create a project:
rails new blog
I get this error when the bundle tries to execute the "bundle install" command:
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.0.0) ruby depends on
bundler (< 2.0, >= 1.3.0) ruby
Current Bundler version:
bundler (1.2.3)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
But with the command:
gem list bundle
returns:
bundler (1.3.5, 1.2.3)
And the command:
bundle -v
returns:
Bundler version 1.3.5
I don't know why that's happening, I appreciate any help, thanks.
Try removing the version in your Gemfile. Just keep
gem 'bundler'
Now run
bundle update
Try check Gemfile.lock for used bundler version.
You also can try to uninstall old version:
gem uninstall bundler --version 1.2.3
You can also specify the version of bundler you want to use
bundle _1.3.5_ install