Mac OSx Lion - Cannot get RoR installed - ruby-on-rails

I recently upgraded to Lion and I am trying to install Rails. I used RubyGems to install rails and each time I tried to start a new rails project I would get an error saying, "Method 'list ' was not found".
So I unistalled Rails using RubyGems. I noticed I had two versions installed. I uninstalled both. I then ran 'gem clean'. Once again I installed Rails but now when I attempt to create a new rails application it's as if rails is not installed.
rails: command not found
I have the new Xcode command line tools installed. Can anyone help a brother out?

I believe my issue is due to the fact RubyGem does not add 'rails' to the $PATH environment variable. I was able to get everything working by installing RVM and using it to update my default Ruby and install Rails

Related

Updating Ruby version on Windows 7

I'm trying to deploy a Rails (4.2.6) application on a Windows 7 system (customer requirement).
I installed rubystack-2.2.5-3 and this comes with Ruby 2.2.0, but my app was developed using Ruby 2.3.1. I started thin server as explained in the deploy instructions and then tried to run my app, but got an error "Method does not exist" and as it is running perfectly in my Linux box, I assumed that it is because of the Ruby version.
I can't install RVM or RBENV on Windows, right? So I researched Google and saw there was a Ruby 2.3.0 installer. I downloaded it and installed it. Then I updated the PATH variable to point to my new Ruby installation. But when I do a bundle install it still complains that my Ruby version in Gemfile (2.3.0) is different from my installed Ruby.
How can I tell it to run the new Ruby?
Am I doing something wrong?

Rubymine can't find Rails on osx

I've upgraded ruby with homebrew. Current version is 2.2.2. Installed Rails by gem. Version is 4.2.4.
Trying to build an empty rails project RubyMine stops soon saying
Can't run 'rails'. Can't find 'rails'.
I've tried both with RubyMine 7.1 and RubyMine Eap 8.
In the shell, obviously everything works perfectly. I think this happens because RubyMine uses ruby in /usr/local/Cellar/ruby/bin instead of /user/local/bin. I've tried to export "cellar" folder in $PATH, but that doesn't work. Any Ideas?
I think this happens because RubyMine uses ruby in /usr/local/Cellar/ruby/bin instead of /usr/local/bin
That sounds right. Each Ruby install has its own set of (global) gems. Make sure you have rails installed using the Ruby installed by Homebrew (not just the system Ruby).

Rails not found after Mac Update

I just ran an Update on my Snow Leopard and today when I tried to run Rails server I got the following:
Rails is not currently installed on this system. To get the latest
version, simply type:
$ sudo gem install rails
On Echo $PATH I get following:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
Update
Running the command giving above for installing rails did not do any harm. I guess updating process removed previous links of rails. the latest version of Rails and dependencies got installed and things working perfect
Try this command
which rails
and see if rails is installed. If it is, add it to your executable path

I've broken my rails installation

Got a new machine and ported settings and files over. Went to update to Rails 3.2 and now I'm getting a list of installed gems when I run "gem list" but when I run the rails command, it tells me: Rails isn't installed.
I'm running OS X Lion and Rails 3.2. I've tried editing the path and creating a symlink and nothing seems to work. I'd be grateful for any help!
Try this tutorial and install Ruby Version Manager. It's got all the steps I followed to get ruby working on my mac.
http://seanbehan.com/mac-os-x/installing-and-using-rvm-on-mac-os-x-creating-gemsets-and-reverting-to-original-environment/

rails is not found when trying to start a new rails project

I just installed Eclipse, then Ruby 1.9.2 then RailsInstaller. I then installed Aptana plugin for eclipse.
My directory setup are as follows:
C:\Ruby192
C:\RailsInstaller\Ruby1.8.7
When I create a new rails project in Eclipse, It throws this error:
LOL#LOL-PC /d/Projects/rail
$ rails .
sh.exe": rails: command not found
I found this solution, but it seems its for linux. I'm using Windows 7.
I reinstalled rails and ruby but its the same thing. I also had installed GitBash and GitExtensions a few months ago and had this problem. I solved it by pointing to the directory where Git was and setting the Default environment to HOME.
I now have no idea what to do to use ruby on rails in this error.
Add the place where you installed rails to your PATH environment variable. (Presumably C:\Ruby192\lib\ruby\gems\1.9.1\gems\rails*\bin)
I also noticed you are using the RailsInstaller for ruby 1.8.7 but seem to have installed ruby 1.9.2. This may cause trouble in the future.
Try following this guide for installing rails on windows. It uses gem install instead of the out dated RailsInstaller.

Resources