vertiginous / pik

Ruby version manager for Windows
830 stars 122 forks source link

[0.3.0.pre] Unable to run rails in ruby 1.9.3 using pik #132

Closed zhon closed 12 years ago

zhon commented 12 years ago

I am unable to run gem executable like rails. Pik is not setting the ruby gems bin path into the command path.

I installed ruby 1.9.3 using the wonderful windows installer. I didn't modify the path to allow ruby to run from the command line. I added ruby 1.9.3 to pik.

pik use ruby-1.9.3-p0 gem install rails rails 'rails' is not recognized as an internal or external command, operable program or batch file.

luislavena commented 12 years ago

Please include detailed output (preferable gist) of pik info after you did pik use ...

Also, please include output of gem list rails -d

Thank you.

zhon commented 12 years ago

https://gist.github.com/1839135

luislavena commented 12 years ago

Can you verify if inside the directory C:\Users\zhon\.gem\ruby\1.9.1 there is a bin directory and inside both rails and rails.bat scripts?

Looks like rails was installed, but maybe just inside the user gem directory?

Can you provide also gem env output in another gist?

Thank you.

zhon commented 12 years ago

https://gist.github.com/1839287

There isn't anything in C:/Users/zhon/.gem/ruby/1.9.1

luislavena commented 12 years ago

OK, according to this line:

  - EXECUTABLE DIRECTORY: D:/tools/Ruby193/bin

Doing gem install rails would have resulted in rails and rails.bat installed in that directory, not the home user one.

Did you install Ruby 1.9.3 with Admin rights? Perhaps is failing to write to the bin directory. Can you confirm that?

Also, it seems is Rails 3.1.3, are you sure you didn't install it with bundle install? Because if you did, bundler is known to place gems binaries in the user directory and sometimes that is not in the PATH.

Perhaps you can uninstall and install the gem again?

zhon commented 12 years ago

Thank you.

Installing from gem put it in the correct path.

Odd, bundle install didn't put it in either the correct bin directory or in user directory.

luislavena commented 12 years ago

Happy to hear it worked.

Perhaps your project has a .bundle/config directory/configuration file? maybe there is a flag or something that is breaking the correct installation.

Closing this up.

Cheers.