Does "gem" and "ruby" work from a normal command prompt?
Did you install rails through bundler? (doing bundle install in your
application?)
If that is the case, then the problem is bundler and where it places
"bin" scripts.
Please do:
gem list rails -d
And note the path where it was installed (under "Installed at")
Most likely there will be a "bin" directory at the same level which
have both "rails" and "rails.bat"
There are three solutions from my point of view:
1) Install rails from outside the bundler, which will place "rails"
script inside Ruby\bin directory and make it available always
2) Add the path indicated in "Installed at" + "bin" to the PATH variable:
SET PATH=<installed_at>\bin;%PATH%
You can set that in your system variables to avoid manually doing
every single time
3) Use "bundle exec" all the time when executing "rails" command.
I vote for first option.
PS: Sorry took so long to notice your message, Google Groups didn't
email us (admins) about it.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
Hello,
> Steps to recreate:
>
> 1. Install ruby 1.8.7 via one click installer
> 2. Install DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe
> 3. Install rubygems via gem command
> 4. Install bundler via gem command
> 5. Install vendor'ed gems via bundle install --local command
> 6. Run "gem list", see gems
> 7. cd to working directory
> 8. Run "rails server", receive rails command not recognized
>
> What am I missing?
>
Sorry, I just answered your other post about this issue:
http://groups.google.com/group/rubyinstaller/msg/34dc8eba03fcaafb
This post confirms what I understood, you used --local option which
will install the gems relative to your application/bundle.
Either you use --binstubs option:
http://gembundler.com/man/bundle-install.1.html
and place the scripts in "bin" (relative to your application)
Which will require you always do "bin\rails" instead of "rails" and
will only work relative to that application.
or install the gem normally with "gem install" and will be installed
at Ruby level.