So we understand, I use Windows 7.
I’ve been fighting my way through ruby.railstutorial.org/ruby-on-rails-tutorial-book, but I seemed to have split my command prompts. Originally, I installed Rails based on the instructions from here: http://railsinstaller.org/windows (this was where guides.rubyonrails sent here). I didn’t notice it until much later, but it seems I created a Command Prompt called “Command Prompt with Ruby on Rails” after following the instructions there.
Now, throughout the rest of RonR tutorial at guides.rubyonrails, I have been using my REGULAR Command Prompt. Meanwhile, I have been running into a lot of strange problems, such as:
- gemfiles/gems not being found even after I explicitly install and/or add them
- EACCES errors when I try to do “Bundle Install” from the location of my app (or any location for that matter)
As a final note, “Command Prompt with Ruby on Rails” always seems to launch from C:\Sites> ( this was the location of my original “demo app” when I installed Rails from railsinstaller.org/windows). However, even if I try deleting \Sites, if I reopen the “Command Prompt with Ruby on Rails”, it magically recreates \Sites.
The RoR command prompt is just a shortcut to CMD.exe with the initial working directory set to
c:\sites, and the%PATH%setup to include your gems and ruby (I guess it could be a custom shortcut, or a batch file to set things up, or an EXE that does the equivalent). It might also be an administrator prompt that has write access to the Ruby install path. It is probably re-creating your directory as it writes some file, perhaps a log, cache, or settings related to ‘last time this was run’.If it is a shortcut or batch file, you should be able to edit it to change the starting location. The errors you are getting are probably due to not having the right
%PATH%and permissions.