I am trying to set up RedMine on Ubuntu 14.04.5 LTS machine and in the end of install have following error:
Redmine requires Bundler 1.5.0 or higher (you're using 1.3.5).
Please update with 'gem update bundler'. (SystemExit)
However, gem update bundlergives me following:
gem update bundler
Updating installed gems
Nothing to update
Moreover:
$ bundle -v
Bundler version 1.15.3
$ gem list | grep bundler
bundler (1.15.3)
I am totally stuck.
Could anybody tell me how to fix it?
I've tried to remove Bundler version check in Gemfile. Then I have following error:
`x64_mingw` is not a valid platform. The available options are: [:ruby, :ruby_18, :ruby_19, :ruby_20, :mri, :mri_18, :mri_19, :mri_20, :rbx, :jruby, :mswin, :mingw, :mingw_18, :mingw_19, :mingw_20] (Bundler::GemfileError)
I've checked solutions here: http://www.redmine.org/issues/19409 and here http://www.redmine.org/issues/19469 - nothing helps...
After this steps: Redmine installation : Error
I have cannot load such file -- bundler/setup (LoadError) error. But bundler is installed and still have version 1.15.3
Please help. I am totally disappointed with these errors.
Sorry for my english.
Try
bundle clean
to remove all bundled gems
Then
bundle install
to install required gems
Edit:
After seeing your new error, look at this answer:
'x64_mingw' is not a valid platform
And this RedMine board post:
http://www.redmine.org/boards/2/topics/45759
An updated bundler gem should be ok, but also check your Gemfile and remove any reference to x64_mingw before running bundle install
Related
I upgraded my environment from Ruby 2.0.0 to 2.2.3.
I also upgraded (overwrite) DevKit, and re-run ruby dk.rb install.
I removed Gemfile.lock and ran bundle install to start with a brand new environment. Everything looks ok, but I get the error:
E:\Projects\development\Stairs>rake db:migrate
rake aborted!
LoadError: cannot load such file -- bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:in `<top (required)>'
E:/Projects/development/Stairs/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- 2.2/bcrypt_ext
E:/Projects/development/Stairs/config/application.rb:7:in `<top (required)>'
E:/Projects/development/Stairs/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
I first had the same issue with Nokogiri, which I solved using this solution : Nokogiri load error
using Juloi Elixir's solution and installing Nokogiri from a local copy.
But I don't feel like doing this foreach gem! It looks like ruby is searching the gem using a ./ or ./2.2 path, while gems are stored in a ./2.2.0 path. Is this configurable?
How can I solve this issue?
Note: Gemfile contains gem 'bcrypt', '~> 3.1.10'
Thanks!
I spent an entire hour fixing this, just now.
Well what I did was I followed some advice online to do a
gem install bcrypt --platform=ruby
And then, it worked in irb.
irb(main):001:0> require 'bcrypt'
=> true
Later when I had to do a bundle install, for some odd reason rails installed another bcrypt and the error was back. So I had two folders in my gem root.
bcrypt-3.1.10
bcrypt-3.1.10-x64-mingw32
So, since the first folder was the one that got built with the devkit, and it works. I deleted the contents of the second folder and copied the contents of the first into it.
Seems to be working as I'm writing this.
Solution was here: bcrypt-ruby#github:
Rebuild locally the bcrypt gem:
Change to the gem directory \Ruby22-x64\lib\ruby\gems\2.2.0\gems\bcrypt-3.1.10-x64-mingw32\ext\mri>
Run ruby extconf.rb
Run make
Run make install
Note that this works only if your DevKit environment is correctly setup (run devkitvars.bat).
#user1185081 's solution worked for me in a windows machine. I ran following commands and worked like magic:
$ cd C:\RailsInstaller\Ruby2.2.0\lib\ruby\gems\2.2.0\gems\bcrypt-3.1.10-x86-mingw32\ext\mri
$ ruby extconf.rb
$ C:\<DevKit Path>\devkitvars.bat (assuming you have devkit installed)(Ran this instead of running "make" because it was not recognized as an internal or external command)
$ make install
What worked for me on Windows 7:
gem uninstall bcrypt to uninstall all versions of bcrypt, including those listed as dependencies
gem install bcrypt to reinstall
bundle install
In my case, a designating of the old version to bcrypt in Gemfile was a cause of the error. I removed a designating of the version and run bundle update bcrypt, then it was settled.
Here is the solution worked for me:
C:\> gem uninstall brcypt
C:\> gem install --no-ri --no-rdoc bcrypt
C:\> cd (path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> ruby extconf.rb
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> make
C:\(path to gems root)\bcrypt-3.1.7-x86-mingw32\ext\mri> make install
I had the same problem:
cannot load such file — bcrypt_ext
Windows 8.1 64bit
ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]
Rails 5.1.4
My solution:
gem uninstall bcrypt-ruby
gem uninstall bcrypt
gem install bcrypt –platform=ruby
added this whole line to Gemfile:
gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', :require => 'bcrypt'
bundle install
This works for me, add this to your gems file:
gem 'bcrypt', '~> 3.1.7', platform: :ruby
This process is for windows:
The problem is with the programs installed on the system.
Uninstall all rails programs:
All Ruby programs.
RailsInstaller.
Removes all files that have been able to uninstall, you have to do it manually inside:
C:\RailsInstaller
Install de ruby version 2.2 from:
http://railsinstaller.org/en
Wait a moment and it's already to go.
MarlonJon.es
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 1.3.5) 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?
Above is the error that i am getting,already tried running 'gem install bundler'. It ran successfully,but bundle install is always throwing this error.Although its a dependancy gem,i have explicitly mentioned bundler gem in gemfile with the version 1.3.5,still getting the same error.Plz reply if anyone has come across such error or help me understand if i am doing something wrong.
you can force the bundler version in bundle install command like this:
bundle _1.2.3_ install.
I've created a gem, and for some reason this one keeps bugging me, and refuses to install properly through bundler.
Here's the Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.9'
gem "switch_access-rails", "~> 1.1.6"
bundle install fails with:
Could not find gem 'switch_access-rails (~> 1.1.6) ruby' in the gems available on this machine.
This works:
gem install switch_access-rails -v 1.1.6
And the gem is here on rubygems: https://rubygems.org/gems/switch_access-rails/versions/1.1.6
I even tried bumping from version 1.1.5 to 1.1.6 just to see if that helped.
Installing version 1.1.4 in with bundle install works.
Any tips on where to start looking/debugging bundle install?
And after a whole day of googling I found this status update from Dec 12: http://twitter.com/rubygems_status/status/279019743166476288
bundle install --full-index
Seems to get the index directly from rubygems instead of from a cloudfront cache.
I had a look at the index, and there is quite a diffence in the two indexes, so if you just released a gem or use a newly released gem, you might have to add --full-index in order to get the proper index.
Do you have rubygems listed as a remote source?
Your Gemfile should have source :rubygems at the top of the file, and $ gem sources should return at a minimum:
*** CURRENT SOURCES ***
http://rubygems.org/
If it's not listed, you can add it with $ gem sources -a http://rubygems.org
Complete new person to Ruby and Rails here... Have tried some tutorials in the past, but that's about it. I'm trying to follow 'Ruby on Rails 3 Tutorial' book and have hit a roadblock that I haven't been able to find any help for after searching on here and the Google..
I haven't actually done anything yet; only:
rails new first_app
then changed the Gemfile sqlite3 to
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
When I run 'bundle install' I get the following:
Fetching gem metadata from http://rubygems.org/.........
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.1) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.1.3)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
I've tried uninstalling the bundler via
gem uninstall bundler -v 1.1.3
and then installing bundler v1.0.0 via
gem install bundler -v 1.0.0
but it seems to get me bundler 1.1.2..
I just feel like I've hit a dead end and can't find any more information on how to solve this issue.
Any help would be greatly appreciated and rewarded with copious amounts of bacon...
UPDATE UPDATE UPDATE
I couldn't get bundler v 1.1.2 to uninstall. I finally was able to uninstall all of the gems by doing:
sudo gem list | cut -d" " -f1 > gem_list.txt
cat gem_list.txt | xargs sudo gem uninstall -aIx
cat gem_list.txt | xargs sudo gem install
And then reinstalling... This allowed me to then do the 'bundle install' and get on track.. Thank you all for your help!
it is because gems are also installed in global gemset, and you can uninstall it using:
rvm #global do gem uninstall bundler
but you can also use the other version of bundler using:
gem install bundler -v '~>1.0.0'
bundle _1.0.0_ install
replace 1.0.0 with the version that got installed (if other)
First verify your versions to be sure they're all current:
$ ruby -v
ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
$ rails -v
Rails 3.2.2
$ gem list bundler
*** LOCAL GEMS ***
bundler (1.1.3)
If you need to update ruby, you can download it from https://www.ruby-lang.org or use tools like ruby-build. If you have any version of Ruby 1.9.3 that's fine for now.
To update all your gems:
gem update --system
gem update
Gem may install gems in a few different places, and these can interfere with each other. There are system gems (typically installed by root or by using sudo) and your personal user gems. My favorite way to manage these is with a simple tool called rbenv. A related tool is rvm. Either is fine.
For your first tutorial, you can skip using version numbers in your Gemfile:
- gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
+ gem 'sqlite3-ruby', :require => 'sqlite3'
Bundler will sort everything out the right way. Eventually you'll want to specify version numbers if you're coordinating with other developers, or building production systems.
Feel free to ask questions here and I'll add to this answer.
Maybe you had bundler 1.1.2 AND 1.1.3 installed on your machine (and possibly more versions)
use
gem list bundler
to check which version(s) of bundler you have installed.
Then remove the ones you don't want with
gem uninstall bundler -v VERSION_NUMBER
You can use latest version of Rails 3.0 (3.0.12). It supports the latest bundler, and isn't fundamentally different from 3.0.1
I had this problem and the source was a version specification for bundler in the .gemspec file:
spec.add_development_dependency "bundler", "~> 1.16"
Removing the version number solved the issue:
spec.add_development_dependency "bundler"
Bundler is a dependent gem of rails, because of which you can see it only in gemfile.lock instead of gemfile.
For a particular rails version only a range of bundler gems are compatible. I also got this error and I tried uninstalling that version of bundler gem which I didn't need. I also tried to install forcefully using bundle_x.x.x_install, but when things didn't work I explicitly mentioned the gem specifying the version falling within the range required by rails version I am using. May be it's not the right way but that is how things worked for me.
Sometimes to fix the issue mentioned in the title of this question it is enough to delete Gemfile.lock and run bundle update. I hope it will be helpful for someone.
I'm having issues with the libv8 gem with ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]. gem install libv8 works fine and I have
gem 'therubyracer'
in my Gemfile and this has a dependency on libv8 which is installed when I do a bundle install:
$ bundle exec gem list
*** LOCAL GEMS ***
actionmailer (3.1.3)
actionpack (3.1.3)
...
libv8 (3.3.10.4 x86_64-darwin-10)
...
but when I run:
$ rails s
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.
it can't find libv8 - is this is a 32/64 bit issue? If so, how do I solve it?
I suspect this was because I had a 32/64 bit mismatch.
I solved this with the following:
$ irb
ruby-1.9.3-p0 :001 > `gem list`.each_line {|line| `sudo env ARCHFLAGS="-arch x86_64" gem install #{line.split.first}`
I had a similar problem deploying from an x86 dev box to an x86_64 server (using capistrano)
When I did the deployment, I got the same 'Could not find libv8-3.3.10.4 in any of the sources' message. This is because running 'bundle pack' on an x86 machine only copies the x86 gem into the /vendor/cache directory!
I fixed this by explicitly adding the linux x86_64 gem file to the /vendor/cache directory, so that it would agree with the deployment server architecture. Deployment ran fine after that.
Another solution is to use nodejs instead of therubyracer. You install it on the server using apt-get/yum, so there's no need for your Gemfile to include execjs or therubyracer.
You can actually install that version on Mavericks:
gem install libv8 -v 3.11.8.17 -- --with-system-v8
You can provide whatever libv8 gem version you want to install ..
After this you might facing issue with installing therubyracer then
Update Version of Gemfile to point to the last version like so:
gem "therubyracer", "~> 0.10.2"
and I was able to successfully install the gem.
If you want to manually install the gem, you can use:
gem install therubyracer --version "~> 0.10.2"
Have you tried bundle exec rails s? It's possible that there's a conflict between the gems you have installed on your system and the gems that are required for your project to run.
I resolved this issue by installing nodejs (latest version). What it does is that it installs the libv8 -dev library along with it. Thus rather than installing the gem what you require is the native library.
You can install it directly or install nodejs as well in your system and the above error should be resolved.