Reputation: 3440
I'm trying to install a rails app on Windows. When I invoke this command:
bundle install
I get this error:
How to fix it?
Upvotes: 2
Views: 7159
Reputation: 221
The bundle install
commands are included with the Ruby DevKit.
Make sure that if you've correctly installed the Ruby Dev Kit (https://rubyinstaller.org/add-ons/devkit/) it can also find where Ruby is installed on your HD.
When you use the command ruby dk.rb init
you should get a message like this
[INFO] found RubyInstaller v2.3.3 at C:/Ruby23-x64
You can also use the ruby dk.rb review
command to ensure that the DevKit has found your install path for Ruby. You should get a message like this
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
C:/Ruby23-x64
Once you're happy with the directories specified in the config file, run the ruby dk.rb install
command. If you're reinstalling the DevKit, you can use the -f command to overwrite anything done previously.
You should see something like this (if you used the -f):
[WARN] Updating (with backup) existing gem override for 'C:/Ruby23-x64'
[WARN] Updating (with backup) DevKit helper library for 'C:/Ruby23-x64'
Once that's done, you can check to see that your Devkit has installed properly by running the install json --platform=ruby
command, after which you should see:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed json-2.1.0
Parsing documentation for json-2.1.0
Installing ri documentation for json-2.1.0
Done installing documentation for json after 2 seconds
1 gem installed
Once your json install starts, you know your DevKit has installed successfully, which should prevent the 'make' error from occurring.
Upvotes: 0
Reputation: 42889
You need to install a Ruby Development Kit as described here: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
It will install a mingw environment allowing rubygems to compile binary gems for the Windows platform.
Be careful to follow the post-installation steps described in this section: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#4-run-installation-scripts
Simply having the ruby-devkit files on your hard-drive is not enough for rubygems to make use of it.
Upvotes: 5