Ruby on Rails 1.9.2

Joined
Oct 30, 2009
Messages
136
Reaction score
0
Points
16
Location
The Milky Way
Your Mac's Specs
iMac Core i5 2.66GHz - RAM 4GB - OS X Snow Leopard
Hello Everyone

Can someone please tell me how I can install RoR 1.9.2 on my iMac Snow Leopard :(

I have tried the following:

Step 1: Get RVM installed to your .rvm directory
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Step 2: RVM Post install
Add this next line to your .bash_profile or .bashrc in your home directory -
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
Step 3: Test your RVM install
Run this command -
type rvm | head -1
And you should see -
rvm is a function
Step 4: Load RVM (this is what step 2 will do for you from now on, but in the terminal you are working in, you'll need to do this since it was not loaded)
Run this -
source ~/.rvm/scripts/rvm
Step 5: Install some packages, readline so your irb/console works and openssl
rvm package install readline
rvm package install openssl
Step 6: Install ruby 1.9.2
rvm install 1.9.2
Or choose a different one from the list generated by this command -
rvm list known
Step 7: Install your a rails 3 gemset
rvm gemset create rails3
Step 8: To see what rubies you have installed
rvm list
Step 9: To see what gemsets you have created
rvm gemset list
Step 10: Pick a ruby and gemset combo to use -
Something like this -
rvm use ruby-1.9.2-p136@rails3
Where the ruby version is on the left of the @ and the gemset is on the right of the @.
Step 11: Use .rvmrc for your projects
From this point on, you can use a .rvmrc in what ever directory needs a particular rvm
So edit .rvmrc and put
rvm use ruby-1.9.2-p136@rails3
And anytime you cd into that directory, the rvmrc file will be executed and your rvm environment will be setup
Step 12: Always know what rvm environment you are in -
rvm info
The important parts are the ruby version (about a 3rd of the way down) and the gemset (very last bit listed)
Step 13: Install rails
Once you've made sure that you're using the proper ruby and gemset, then you can install gems (do not use sudo here)
gem install rails
This will install the latest rails version, 3.0.4 as of 2/8/2011
Step 14: Create your rails app
rails new my_app
Step 15: You'll need bundler to run your Gemfile
gem install bundler
Every other gem for the project should be maintained in the Gemfile and installed using bundler
bundle install

However on step one, I get the following error:

bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
109 986 109 986 0 0 2094 0 --:--:-- --:--:-- --:--:-- 5301
bash: line 31: git: command not found
ERROR: Cloning from git://github.com/wayneeseguin/rvm.git failed, trying via https now (https://github.com/wayneeseguin/rvm.git).
bash: line 35: git: command not found
ERROR: Cloning from https://github.com/wayneeseguin/rvm.git failed, perhaps your git version does not support the https protocol? out of ideas... halting.

I would greatly appreciate any help. I really need this for my University exercises :(
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Does the included version not work for you? OS X comes with Rails but it may be a bit out of date.

Follow the instructions here - much simpler. If that doesn't work, you can get the version of git you have by executing the following:
Code:
git --version
Compare that to the required version.
 
OP
Ciwan
Joined
Oct 30, 2009
Messages
136
Reaction score
0
Points
16
Location
The Milky Way
Your Mac's Specs
iMac Core i5 2.66GHz - RAM 4GB - OS X Snow Leopard
Yep you said it. It is way out of date.

I really need the latest version :(

I'll try and follow them instructions, will be back.
 
OP
Ciwan
Joined
Oct 30, 2009
Messages
136
Reaction score
0
Points
16
Location
The Milky Way
Your Mac's Specs
iMac Core i5 2.66GHz - RAM 4GB - OS X Snow Leopard
OK I'm back

Code:
git --version

says Command not found !

As for the links what instructions do you mean ? I can't see any instructions on there ! There is a download of Source >> but that's not 1.9.2.

Also It doesn't say how I would compile assuming I had 1.9.2 :(
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Git homepage.

The instructions are there. Ensure that Ruby is installed and is recent enough. Then, install RubyGems. Once that is installed, use it to install Rails.
 
OP
Ciwan
Joined
Oct 30, 2009
Messages
136
Reaction score
0
Points
16
Location
The Milky Way
Your Mac's Specs
iMac Core i5 2.66GHz - RAM 4GB - OS X Snow Leopard
Hello Vansmith.

Although I have an iMac, I'm still a n00b at many simple things.

I have gone ahead and installed Git, and now the version command returns 1.7.4.1

How do I get RoR 1.9.2 now ?

I have gone ahead and tried them instructions in my first post and this time I did not get error (must have been a { git } thing) it said that RVM was now installed.

Now I'm stuck on the 2nd insturction, I don't see a .bash_profile in my home directory :(
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
If there isn't one there, create it.

I'm not sure where you got your instructions from - they look needlessly complex. The instructions I provided are much simpler and come from the RoR website.
 
Joined
Feb 4, 2013
Messages
7
Reaction score
0
Points
1
Terminal that is Commands-Tempermental

Ruby and Rails are installed, per my terminal, and updated to the latest versions. However, the commands are not being recognized, and it's not like the application is hanging out in my Applications folder, like a text editor. I am guessing it's more like MySQL, meaning it gets compatible with my terminal commands and shells I install, but it exists within my OS... so without being able to access it with commands, what use is it? Any common reasons this happens/popular fixes? I have a feeling something with -bash is off, and so I will research more steps related to it, but when I echo $PATH I also get a somewhat convoluted output: echo $PATH
/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin

Not sure that is effective. All help appreciated.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Which commands are not recognized? Have you done a "whereis" or "which" for each of those?
 
Joined
Feb 4, 2013
Messages
7
Reaction score
0
Points
1
New to Unix formatting. I came across "Take Control of the Mac Command Line with Terminal" pdf, so I'm familiarizing, but in your example, do I need any formatting, or is it whereis ruby? whereis rails? whereis sublime?
 
Joined
Feb 4, 2013
Messages
7
Reaction score
0
Points
1
Does that path look out-of-sorts, however? why are ruby and rails such a part of the overarching path (at top)??
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top