SitePoint Sponsor

User Tag List

Results 1 to 15 of 15
  1. #1
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem Installing Ruby on Mac OS 10.4

    I’m having trouble installing Ruby using the following instructions on page 25 of Build Your Own Ruby On Rails Web Applications by Patric Lenz. It refers to installing Ruby on Mac OS 10.4, which is what I am using on a brand new MacBook. I installed Xcode and readline first as instructed.

    Quote:

    With Readline in place, we’re now able to install Ruby itself. Type out the following series of commands, exactly as you see them here. It’s not important that you understand every line, but it is important that you don’t make any typos. This step might also test your patience somewhat, as the configuration step may take half an hour or more to complete, depending on the speed of your system and your network connection.

    $ curl ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.4.tar.gz \
    | tar xz
    $ cd ruby-1.8.4
    $ ./configure --prefix=/usr/local --enable-pthread \
    --with-readline-dir=/usr/local
    $ make
    $ sudo make install
    $ sudo make install-doc
    $ cd ..

    How did you go? It might be prudent at this point to run some checks, to determine whether our installation is on track so far. The simplest and safest way to tell whether our Ruby installation is working is to type the following command into the Terminal window:

    $ ruby –v

    The version that you should see displayed is ruby 1.8.4 (2005-12-24), as shown in Figure 2.8. If anything else is displayed here (such as ruby 1.8.2 (2004-12-25)), something has gone wrong. You should carefully repeat the instructions up to this point.

    Remember—if you get stuck, you can always try asking for help on SitePoint’s Ruby forum [http://www.sitepoint.com/launch/rubyforum/].

    End Quote

    I have done it twice and both times it showed that I installed Ruby 1.8.2 (2004-12-25), just what he says is wrong.

    I would appreciate help on how to get past this brick wall. I am new to this forum so if I have not done it correctly, I apologize.

    Thanks

    GWB3

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm, you're probably pointing to the existing version of Ruby that comes with Mac OS X.

    I've never installed ruby purely from its source before - I use MacPorts (aka Darwin Ports), which technically speaking does install ruby from source but it is managed in a ports (think packages) system.

    Before you look into doing this via Darwin Ports though, I think you can fix this problem by adding /usr/local/ruby/bin to your PATH environment variable.

    You can easily verify which 'ruby' executable you are running by entering
    Code:
    which ruby
    in a terminal. It's probably pointing to the default Mac OS X one rather than the one you installed in /usr/local/ruby.

  3. #3
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    It's working now

    Thanks Redemption, I think you were right that I didn't have the PATH envirnment variable set right. I redid it and ran the installation again. This time it worked correctly. Thanks for clueing me in on the "which ruby" command. It was a big help.

    GWB3

  4. #4
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cool, glad it worked out

    Either way, I hope you will consider using MacPorts See http://darwinports.opendarwin.org/docs/ch01s02.html

    It makes it really easy to install stuff, just a
    Code:
    sudo port install ruby
    and you're usually good to go.

  5. #5
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MacPorts

    Thanks again. I wish I had known about macPorts sooner; it sounds like the easy way to do it. Once I got Ruby installed correctly I had no trouble installing Rails and Gems.

    Then I ran into trouble installing MySql and getting it to work correctly. So now I'm stuck there. I will check MacPorts to see if I can use it to install MySql.

  6. #6
    l º 0 º l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I never bother with any of this; I use Locomotive for RoR, and MAMP for, well, the AMP. Depends on what you really need, of course, but the simplicity of those two combos beat out anything else I've heard.
    .
    Zach Holman
    good-tutorialsblogtwitterlast.fm

  7. #7
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why I choose not to use locomotive

    IoOoI,

    On page 19 of Patrick Lenz's book there is the following footnote.

    "There is an all-in-one installer available for Mac OS X, called Locomotive [http://locomotive.raaum.org/]. Unfortunately, it ships with the SQLite database server, instead of MySQL. It’s not that I have anything against SQLite as a database, but in a book that’s already covering all operating systems, there’s only so far one can go to cater for possible combinations of technologies. For this reason, I don’t recommend that you use Locomotive to work through this book."

    That is why I choose not to use locomotive. I'm using the book to learn RoR.

  8. #8
    l º 0 º l silver trophybronze trophy lo0ol's Avatar
    Join Date
    Aug 2002
    Location
    Palo Alto
    Posts
    5,329
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    gwb3- Yeah, that's somewhat unfortunate, though I don't use it either. That's why I'm usually running an instance of MAMP at the same time. I have Rails talk to the MySQL database that MAMP provides and I call it a day. It works well for me: two apps that I can start really quickly (MAMP has a nice dashboard widget always a click away), MAMP provides phpMyAdmin, and they're all compartmentalized so that if for some reason I muck up in one environment, I can just reinstall or create a new environment. For example, for some reason or another I have version x of Rails in one project and version y of Rails for another project- with Locomotive I can switch back and forth without any work at all.
    .
    Zach Holman
    good-tutorialsblogtwitterlast.fm

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2004
    Location
    Michigan
    Posts
    156
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I too am installing Ruby using the instructions in this book and if you've completed the installation and the command 'ruby -v' is still saying you have a version other than 1.8.4 installed, simply close terminal and try running the command again. It should be updated. It was for me.

    -Mason

  10. #10
    SitePoint Enthusiast crag's Avatar
    Join Date
    Apr 2003
    Location
    Ft. Lauderdale, FL
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There is an excellent step-by-step guide to compiling and instlaling ruby, gems, mongrel (the ruby web server), mysql and a few other packages (for OSX 10.4) at: http://hivelogic.com/narrative/artic...grel-mysql-osx

  11. #11
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks stoavio, i tried exiting the shell and it looks like that was all that i needed to do! Now it shows 1.8.4!

  12. #12
    SitePoint Guru Skyblaze's Avatar
    Join Date
    Jul 2005
    Location
    Italy
    Posts
    734
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i now own a macbook with tiger 10.4.9. Which is the best way to install all the rails development environment stuff? I already use mamp for php.

  13. #13
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This might be of interest to some of you....

    http://hivelogic.com/narrative/artic...grel-mysql-osx

  14. #14
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi all, now I have a problem installing ruby and rails on OSX 10.4.9

    I get this error message when trying to start the webrick server



    Machine:~/Desktop/build/moviecritic magic8ball$ script/server
    => Booting WEBrick...
    => Rails application started on http://0.0.0.0:3000
    => Ctrl-C to shutdown server; call with --help for options
    [2007-04-07 14:59:21] INFO WEBrick 1.3.1
    [2007-04-07 14:59:21] INFO ruby 1.8.4 (2005-12-24) [powerpc-darwin8.8.0]
    [2007-04-07 14:59:21] INFO WEBrick::HTTPServer#start: pid=14660 port=3000
    dyld: NSLinkModule() error
    dyld: Symbol not found: _rl_filename_completion_function
    Referenced from: /usr/local/lib/ruby/1.8/powerpc-darwin8.8.0/readline.bundle
    Expected in: flat namespace

    Any ideas ?
    suggestions for fixing this would be welcome

    ruby -v gives 1.8.4
    rails -v give 1.2.3
    gem -v gives 0.9.0

    thanks in advance

  15. #15
    SitePoint Member
    Join Date
    Mar 2005
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in addition I'm getting

    Loading development environment.
    dyld: NSLinkModule() error
    dyld: Symbol not found: _rl_filename_completion_function
    Referenced from: /usr/local/lib/ruby/1.8/powerpc-darwin8.8.0/readline.bundle
    Expected in: flat namespace

    now I've tried to install the readline library two times

    how do I scrub my system so I can start again ?

    ta
    Last edited by Magic8Ball; Apr 7, 2007 at 10:58. Reason: missing sentence


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •