I installed Aptana Studio 3 and attempted to create my first Rails file, only to receive the error
sh.exe: rails: command not found
Am I supposed to edit my System Variables to include the Path? If so, where the heck is rails.exe because I cannot find that directory.
Based on your "sh.exe" filename, I am assuming you are running Windows. You will need to verify that the command "rails" is accessible in your system path so that Aptana can find it. Do this by modifying the "PATH" system variable to include the directory to your Ruby installation (this may require a restart to take affect).
Instructions for modifying the system path can be found here: http://www.computerhope.com/issues/ch000549.htm
If you used an installer of Ruby packaged for Windows such as Railsinstaller, point to the path of this installation. Gems will place executable files in the "\bin" folder. The "rails" executable is a script from the rails gem.
I have the same problem and I have solved it. I am using Windows 7 with Aptana Studio 3. The problem is that actually Rails is not installed on my Computer after I installed Aptana Studio 3.
Basically I follow the instructions given by this website
First you need a ruby installer for windows. After installation, Click on Start Command Prompt with Ruby from Start->All program->ruby folder and type gem install rails in command line and you are done. Wish that you can solve your problem as well.
Aptana Studio 3 does not install rails for you by default. You will need to download a rails installer as mentioned here:
http://wiki.appcelerator.org/display/tis/Rails+Development
Related
I installed Ruby and Rails and set-up the PATH to "C:\Rails\Ruby2.3.0\bin", but when I try to run commands with rails, I get the error message:
The System cannot find the path specified.
I am able to run commands using ruby, and rails works if I use GitBash. How do I make it work on my normal command line?
Had the same problem here, installed the same way. Couldn't even run rails commands on GitBash, only way was going in C:\Rails\Ruby2.3.0\binthrough cmd and typing, for example, ruby rails new projectname. The rails new projectnamewouldn't work even in these conditions.
What I did was going in the Command Prompt with Ruby and Rails and entered gem install rails (which did not work on cmd). I also did gem install bundle. Both installed successfully and that fixed all consoles for me: cmd, GitBash (wasn't working for me), Command Prompt with Ruby and Rails and even cmder works with Rails now.
Hope this helps you.
Cheers.
If it's a simple question of locating the rails executable on Windows, then on later installs that use msys64 instead of DevKit, you'll find rails at the following folder:
c:\msys64\o-rdoc
Add this to your PATH or execute from that folder.
Your path may vary on 32-bit systems or if you changed the default install folder.
I am using windows 10. I install Rails and other supporting software via railsinstaller.org website.
Now I go on CMD and writing command rails server but Rails server not starting work. when I open link in firefox http://localhost:3000
Following is snapshot of output when I write rails s in cmd. I have Rails 4.2.5.1 in my PC and using Windows 10
The problem my be caused due to following (Unable to Install gems)
if you are using latest version of ruby installer to install ruby then there are problem for installing nokogiri and ulifier or other gem which needs to compailing in your pc. so you needs to install devkit first. For this please do following:
The download is a self-extracting archive. When you execute the file, it’ll ask you for a destination for the files. Enter a path that has no spaces in it. We recommend something simple, like C:\RubyDevKit\. Click Extract and wait until the process is finished.
Download from here
Next, you need to initialize the DevKit and bind it to your Ruby installation. Open your favorite command line tool and navigate to the folder you extracted the DevKit into.
cd C:\RubyDevKit
Auto-detect Ruby installations and add them to a configuration file for the next step.
ruby dk.rb init
Install the DevKit, binding it to your Ruby installation.
ruby dk.rb install
Now run bundle install
If still problem persist downgrade your ruby or install linux distro.
You need to change your directory to the app root folder.For Example if your app name is 'myapp', then type cd myapp and run rails server with rails s.
Check if the bin/rails file is in place. If not, generate a new sample app, then copy the bin folder to it.
simply add gem "tzinfo-data" to your Gemfile and run bundle install and you are good to goenter image description here
I'm installing 1.87.
I got ruby installed and ruby gems
then I tried this from the command prompt: gem install rails
and it gave me this error: http://screencast.com/t/wmBr2b1vC5I
I got the devkit like it suggested and put it in a directory on my desktop but when I went to github for instructions I got lost.
Can someone help guide me step by step? I'm used to PHP and MySQL using WAMP so running things from the command line is new to me.
A lot of gems require native code to be built and linked to as they're being installed. Unfortunately, Windows does not provide any compiling and linking tools, so you have to take one of several routes to enable building native code in Ruby gems.
I've always used Cygwin in the past to accomplish this, but there's also the Ruby Installer which may benefit you more.
Ruby Installer: http://rubyinstaller.org/
You'll probably need to remove your current Ruby install before running the installer, but it should give you everything you need to make installing Rails possible.
If you don't want to use the full installer, you can download "Development Kit", which is part of the installer, to just add the necessary build tools to your command-line environment.
Development Kit: https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
I am in the process of installing Ruby on Rails on windows 7. I installed ruby-1.9.2 (in c:\ruby) and I've installed rails using the gem install rails command (doing this from c:\ruby\bin since this is the only place i can call the command). I've then run rails new my_app command.
The problem that I have is trying to run the rails server command from inside the apps folder (c:\ruby\bin\my_app) I get the message: 'rails' is not recognized....
What have I done wrong?
On Windows you need to set your system PATH variable (My Computer -> Properties -> Advanced -> Environment Variables -> System variables)
Append the PATH Variable value:: c:\ruby\bin;
I'm a windows 7 user, and I was able to get rails working by following this guide:
http://www.wiki.devchix.com/index.php?title=Windows_-_Rails_3
I know linking is frowned upon, but the windows 7 installations is quite detailed, and the devchix guide is excellent. I store my apps on the desktop in a folder called 'rails' not in the ruby bin.
Try Rails For The Windows installer. It allows you install Ruby and Rails on Windows in a very simple way.
How do I properly setup Aptana RadRails if I've installed Rails through RVM?
I followed the install on http://railstutorial.org/ but my script paths don't work: e.g.:
'rails' path: /home/marius/.rvm/gems/ruby-1.8.7-p302#rails3gemset/bin/rails
Detected path: Not Detected
After installing ruby through rvm, I was able to get eclipse to use that install by:
In Eclipse, go to Window -> Preferences.
In the Ruby/Interpreters tab click "Search"
For me this found all of the ruby installs from rvm, and it added them to the interpreters list. I edited the "Name" field to include the version number for convenience.
try to run this in the command line. It will show you real path to the available rail script for current environment.
$ which rails
In Aptana Studio 3 (build: 3.0.8.201201201658) there is no Window -> preferences. If you have a .rvmrc in your project work directory, stating for instance:
rvm use ruby-1.9.3-p0#mygemset
... then Aptana should pick up the correct environment; in this case using ruby-1.9.3-p0 with gemset mygemset. Don't forget to run build install or build update (when you updated your Gemfile) from your project working directory path.
I must add that Aptana Studio 3 seems a bit buggy when it comes to picking up the correct environment, especially when trying to use ruby-debug-ide19.
Did you try with just /home/marius/.rvm/gems/ruby-1.8.7-p302/bin/rails ?
You have to run eclipse/aptana from a terminal session.
Without RVM :
Please type command whereis ruby in console.
you will get the path like /usr/bin/ruby or /usr/local/bin/ruby to check which is correct interpreter path /usr/bin/ruby -v if you get version. that is your interpreter.
With RVM :
Please type command: rvm info
binaries:
ruby: "/home/<USERNAME>/.rvm/rubies/ruby-2.0.0-p247/bin/ruby"
copy this path and paste wherever you need enter you interpreter path.
It worked for me. and I hope it will help others as well.
Cheers!