Cameron Aziz Cameron Aziz - 1 year ago 130
Ruby Question

bundle install fails after using RailsInstaller

I have installed Ruby using RailsInstaller. The location of the install is

. When I create a new project with RubyMine I can not start the web service as I can't even run
bundle install

C:\Users\Cameron\Documents\Development>bundle install
The system cannot find the path specified.

I have the following that pertains to Rails in my


I have done some research online and a lot of people are claiming that it is
is incorrect. Here is the original file at

IF NOT "%~f0" == "~f0" GOTO :WinNT
@"C:\RailsInstaller\Ruby2.2.0\bin\ruby.exe" "C:/RailsInstaller/Ruby2.2.0/bin/rails" %1 %2 %3 %4 %5 %6 %7 %8 %9
@"C:\RailsInstaller\Ruby2.2.0\bin\ruby.exe" "%~dpn0" %*

I have tried to change to this, with no luck:

IF NOT "%~f0" == "~f0" GOTO :WinNT
ECHO.This version of Ruby has not been built with support for Windows 95/98/Me.
@"%~dp0ruby.exe" "%~dpn0" %*

I have attempted to manually initialize DevKit and got the following:

C:\RailsInstaller\DevKit>ruby dk.rb init
[INFO] found RubyInstaller v2.2.1 at C:/Ruby22

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\RailsInstaller\DevKit>ruby dk.rb install
[ERROR] Skipping invalid directory 'C:/Ruby22'

Going into
and changing
- C:/Ruby22
- C:/RailsInstaller/Ruby2.2.0
and then rerunning:

C:\RailsInstaller\DevKit>ruby dk.rb install
[INFO] Skipping existing gem override for 'C:/RailsInstaller/Ruby2.2.0'
[WARN] Skipping existing DevKit helper library for 'C:/RailsInstaller/Ruby2.2.0'

What do I need to do / change so that I can use my local environment for RoR development.

Answer Source

Try to manually initialize DevKit:

ruby dk.rb init
ruby dk.rb install

And make sure that the config.yml (inside DevKit) points to the right place before running dk.rb install:

- C:\RailsInstaller\Ruby<version number>

EDITED: As @Cameron pointed on comment, it might be necessary to run ruby dk.rb install -f after modifying config.yml

I had the same problem and, in my case, the config.yml was pointing to somewhere else other then Ruby installed by RailsInstaller.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download