15 Apr 2011, 14:42
Generic-user-small

patrick lynch (11 posts)

Previously, I installed RoR on a windows pc without any problem. I now have to install it on Mac…and I’m new to the Mac… I have a Mac OS X 10.5 Leopard… The book’s instructions [1.2 Installing on Mac OS X] indicates that MacPorts needs to be used.. Unfortunately, I don’t have MacPorts installed - so, I proceeded to install it…it requires X11 and X11 requires Xcode… However, Xcode requires Snow Leopard - so, this cost me $35 for an upgrade from Apple… I’m waiting for the upgrade, should be here in a few days…

Is this the way to do this, that is, install MacPorts, X11 and Xcode or is there another way to download RoR?

Thanks

15 Apr 2011, 17:15
Generic-user-small

Steve Castaneda (11 posts)

Have you checked out brew?

http://bsdjedi.blogspot.com/2011/03/moving-over-from-macports-to-brew.html

I used Brew to install Postgresql for deployment to Heroku on my local machine a while back, so I’m sure it can handle a RoR installation.

16 Apr 2011, 01:02
Generic-user-small

secondplanet (4 posts)

Homebrew needs Xcode too. Mac comes with Ruby, can’t you just type @gem install rails@?

16 Apr 2011, 16:02
Generic-user-small

patrick lynch (11 posts)

Good morning, I tried the following: 1. gem install rails returns: ERROR: While executing gem … (Gem::RemoteSourceException) HTTP Response 302 fetching http://gems.rubyforge.org/yaml 2. http://dev.rubyonrails.org/ returns: Safari can’t open the page… 3. Homebrew indeed needs Xcode and Xcode needs OSX 10.6.6 In regard to this, I have purchased Snow Leopard…and it look like I will have to buy Xcode too [bummer]… Wish me luck…[I’m really starting to miss my Windows PC]

16 Apr 2011, 18:01
Generic-user-small

secondplanet (4 posts)

Well, Xcode 3 is free and the paid Xcode 4 isn’t even supported by Homebrew yet. I just noticed this. http://www.opensource.apple.com/release/mac-os-x-1067/ This is a list of stuff that comes with Mac OS X 10.6.7. Ruby on Rails is on that list. So, if you upgrade you won’t need to do anything.

17 Apr 2011, 17:10
Generic-user-small

patrick lynch (11 posts)

I tried the command: rails –version and got back: Rails 1.2.6 I then tried the command: gem install rails and got: ERROR: While executing gem … (Gem::RemoteSourceException) HTTP Response 302 fetching http://gems.rubyforge.org/yaml

I also tried the screencast at http://ruby.railstutorial.org/#buy - rails installation (OSx/Linux) - it looked very promising but its description of the git and curl are out-of-date and I couldn’t get it to work…

17 Apr 2011, 17:23
Generic-user-small

patrick lynch (11 posts)

Thanks for the link in regard to the OS X 10.6.7 stuff…I ordered an update of Snow Leopard which presumably is 10.6.7. The link you provided shows that 10.6.7 contains Ruby on Rails 28.1. The AWDWR [“Agile Web Development with Rails”] book indicates that it requires ror [Ruby on Rails] 1.8.7. My question is, is ror 28.1 the same as ror 1.8.7? If it is, I’m hoping I will not have to download Xcode.

Thank you

17 Apr 2011, 19:36
Generic-user-small

Scott White (6 posts)

Patrick,

The packages listed at opensource.apple.com are named based on their Mac build number, which is not the same as the version of the project’s source code. It’s a bit misleading, but if you look at each project’s plist file you can find the version. Also, don’t confuse the version of Rails with the version of Ruby.

The Mac build RubyOnRails-28.1 is Rails version 2.3.5 (as well as legacy version 1.2.6) The Mac build ruby-75.3 is Ruby version 1.8.7-p174

Hope this helps, Scott

18 Apr 2011, 16:32
Generic-user-small

patrick lynch (11 posts)

Good afternoon Scott, Thanks for the information… I went to RubyOnRails.plist but couldn’t find the RoR version…I searched for 1.8.7 and 1.9.2 but couldn’t find it…I also searched for 1.8 and 1.9… I have to admit to being an Apple ‘newbie’, so please excuse by lack of knowledge… Could you please tell me what to search for… I’m waiting for my Snow Leopard upgrade installation cd… Thank you

19 Apr 2011, 01:04
Generic-user-small

Scott White (6 posts)

Hi Patrick,

The RubyOnRails build is for Rails, which is version 2.3.5 (and the 1.2.6 version). I believe you are confusing the Ruby version number for the Rails version number…remember they are separate projects.

If you go to the plist for RubyOnRails-28.1:

http://www.opensource.apple.com/source/RubyOnRails/RubyOnRails-28.1/RubyOnRails.plist?txt

You’ll find the Rails version:

    <dict>
        <key>OpenSourceProject</key>
        <string>rails</string>
        <key>OpenSourceVersion</key>
        <string>2.3.5</string>
        <key>OpenSourceWebsiteURL</key>
        <string>http://www.rubyonrails.org</string>
        <key>OpenSourceSHA1</key>
        <string>e341aba6d1be9ec89ffe924a960e2c56c073954c</string>
        <key>OpenSourceImportDate</key>
        <string>2009-12-11</string>
        <key>OpenSourceLicenseFile</key>
        <string>rails.txt</string>
        <key>OpenSourceModifications</key>
        <array>
        </array>
    </dict>

</code>

You will also find Rails version 1.2.6 in that file:

    <dict>
        <key>OpenSourceProject</key>
        <string>rails</string>
        <key>OpenSourceVersion</key>
        <string>1.2.6</string>
        <key>OpenSourceWebsiteURL</key>
        <string>http://www.rubyonrails.org</string>
        <key>OpenSourceSHA1</key>
        <string>10b539a69678c3665d61f8b91b6268a863737199</string>
        <key>OpenSourceImportDate</key>
        <string>2008-12-01</string>
        <key>OpenSourceLicenseFile</key>
        <string>rails.txt</string>
        <key>OpenSourceModifications</key>
        <array>
        </array>
    </dict>

</code>

Similarly, in the plist file for the ruby-75.3 build:

http://www.opensource.apple.com/source/ruby/ruby-75.3/ruby.plist?txt

You’ll find the Ruby version in:

<dict>
    <key>OpenSourceProject</key>
    <string>ruby</string>
    <key>OpenSourceVersion</key>
    <string>1.8.7-p174</string>
    <key>OpenSourceWebsiteURL</key>
    <string>http://www.ruby-lang.org/</string>
    <key>OpenSourceURL</key>
    <string>ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz</string>
    <key>OpenSourceSHA1</key>
    <string>f98f5e03121c9614defc6aa6da63ab265d5d6480</string>
    <key>OpenSourceImportDate</key>
    <string>2010-04-11</string>
    <key>OpenSourceLicense</key>
    <string>Other</string>
    <key>OpenSourceLicenseFile</key>
    <string>ruby.txt</string>
    <key>OpenSourceModifications</key>
    <array>
        <string>remove -lobjc link</string>
        <string>use dlsym</string>
        <string>ruby configure test for endianness fails</string>
        <string>disable -static in rbconfig</string>
        <string>make [md5|sha1].bundle using CommonCrypto instead of OpenSSL</string>
        <string>all libraries are compiled 4-way fat (i386, ppc, x86_64 and ppc64) but the tk extension, and the ruby command line binary is kept 2-way fat (i386 and ppc) for compatibility purposes</string>
        <string>emit DTrace static probes when entering/leaving a Ruby method</string>
    </array>
</dict>

</code>

The version number bundled in the build is found in the value of the OpenSourceVersion key.

-Scott

20 Apr 2011, 13:26
Generic-user-small

secondplanet (4 posts)

If versions are confusing you, rvm is brilliant. https://github.com/wayneeseguin/rvm

24 Apr 2011, 19:38
Generic-user-small

Green David Dude (1 post)

Patrick,

I succesfully installed Ruby and Rails on iBook G4 running Mac OS X 10.5.8 with a G4 processor which can’t be upgraded to snow leopard or run xcode 4.0.

Here a copy of my notes on how I did this:


Step 1 - Install Xcode

Instructions for installing Apple’s Xcode Developer Tools - Version 3.1.4:

  1. Go to http://connect.apple.com/ click on Developer Tools under Download on right, download and read Xcode 3.1.4 PDF file. Then download “Xcode 3.1.4 Developer DVD (Disk Image). Takes about an hour and is 993 MB.
  2. Double click the XCodeTools.mpkg
  3. Included “System Tools” and “Unix Development” (needed for the optional components for command line development).

Step 2 - Install MacPorts

Instructions for installing MacPorts - Version 1.9.2:

  1. Go to http://www.macports.org/install.php
  2. In the Mac OS X Package (.pkg) Installer section click on the downloading dmg for Leopard link.
  3. From command line run command sudo port -v selfupdate

Step 3 - Install SQLite 3

Instructions for installing SQLite 3 (Version 3.7.5):

  1. From terminal type the command: sudo port install sqlite3

Note: To see which ports are installed use the command: sudo port installed

Step 4 - Install Ruby

Instructions for installing Ruby (Version 1.8.7):

* sudo port install ruby
* sudo port install rb-rubygems

Step 5 - Install Rails

Instructions for installing Rails (Version 3.0.6):

* sudo gem update --system
* sudo gem uninstall rubygems-update
* sudo gem install rails
* sudo gem install sqlite3

Note: To display gems installed try this command:

sudo gem list –local


Good luck! I hope this helps someone out.

28 Apr 2011, 00:18
Generic-user-small

patrick lynch (11 posts)

i installed the Snow Leopard upgrade and it got me to Ruby 1.8.7… i then was able to get the latest version of rails… the only problem i have is that ‘tk’ was not installed…. if someone can guide me in regard to installing ‘tk’, i’d be very grateful… thank you

12 Oct 2012, 13:29
Generic-user-small

shanu cis (1 post)

i came across the problem of installing ‘tk’ and so its not working properly and could not complete my work. ruby on rails developers can easily do so.

  You must be logged in to comment