SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    Once I was a Factory Worker goofy's Avatar
    Join Date
    Dec 2004
    Location
    Sydney Australia
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Setting Up Rails on Mac

    I'm looking at getting into Ruby on Rails so I'm planning on installing rails on my mac. I've already got MySQL installed along with Apache and PHP. Has anyone had any issues where installing Rails created issues with the current setup. This is my main coding machine and want to minimize the chance of causing any problems.

    From looking at http://locomotive.raaum.org/ it shouldn't cause any problems. Has anyone else done this?
    Goofy
    Life is what you make it!
    Follow your dreams!

  2. #2
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've got Apache, PHP, Mysql, and Rails all running together. Though it is on XP, not a mac. I only access the rails stuff through the webrick server, I haven't set up apache to work with ruby or set up fcgi. For development though, it is easy enough to just run
    ruby script/server
    and load up localhost:3000 in your browser to access the webrick server.
    If you give someone a program,
    you will frustrate them for a day;
    if you teach them how to program,
    you will frustrate them for a lifetime.

  3. #3
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah I have friends who are using Locomotive and it's perfectly simple to setup from what I've heard. I'd suggest doing that. It wouldn't screw up your current setup because from what I understand it runs in its own sandbox. Your Apache setup won't be touched so that part's fine at least.

    For myself, I setup Darwin Ports (renamed to MacPorts) and installed Ruby via the ports system, and Rails and Mongrel via rubygems. That's just me though, I prefer setting stuff up myself and also because until not long ago Locomotive had Lighttpd as the default server instead of Mongrel (it is Mongrel now though).

  4. #4
    Once I was a Factory Worker goofy's Avatar
    Join Date
    Dec 2004
    Location
    Sydney Australia
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by redemption
    Locomotive had Lighttpd as the default server instead of Mongrel (it is Mongrel now though).
    Ok so I see the latest version of Locomotive has Mongrel but why is this better?
    Goofy
    Life is what you make it!
    Follow your dreams!

  5. #5
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I won't pretend to be articulate enough or have to time to explain everything on why Mongrel is "better". You can read http://blog.duncandavidson.com/2006/...b_is_a_pi.html for that

    My reasons are primarily because Mongrel is the deployment server I use for production, my own observations of random 500 errors of Rails applications deployed via FastCGI on Lighttpd, and Mongrel is just easier to setup (though Lighttpd + FastCGI is rather trivial to setup as well, barring stupid configuration errors which always happens to me :/). My deployment setups all include Mongrel being proxied by either Apache or Lighttpd, and I've found these to be way more stable than trying to do FastCGI.

    Oh, and I have to add, I'm more familiar with configuring Apache servers than Lighttpd, so using Mongrel allows me to still have a familiar Apache frontend web server where I can install PHP and what not, and also have Rails running (proxied).

  6. #6
    SitePoint Guru CompiledMonkey's Avatar
    Join Date
    Sep 2002
    Location
    Richmond, VA
    Posts
    975
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I used Locomotive on my Mac and it's amazingly simple. I had MySQL installed already so once I installed Locomotive I was up and running in minutes.

  7. #7
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I just do mongrel on my Mac. I'm not all that interested in maintaining Apache/lighttpd/litespeed on my laptop so I set up a testbed on my hosting account if/when I need it.

  8. #8
    SitePoint Guru CompiledMonkey's Avatar
    Join Date
    Sep 2002
    Location
    Richmond, VA
    Posts
    975
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Vinnie, any reason you don't use Locomotive?

  9. #9
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by CompiledMonkey
    Vinnie, any reason you don't use Locomotive?
    Now that locomotive uses mongrel I'd probably go for it if I was starting fresh, but at the time I set everything up it wasn't an option if I wanted to run mongrel (only lighttpd/fastcgi then).

  10. #10
    Once I was a Factory Worker goofy's Avatar
    Join Date
    Dec 2004
    Location
    Sydney Australia
    Posts
    559
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anything I could find on setting up rails on the mac was outdated and I didn't want to risk anything going wrong. So I just ended up using the latest version of Locomotive as I've already got MySQL installed and it works just fine.
    Goofy
    Life is what you make it!
    Follow your dreams!

  11. #11
    SitePoint Guru downtroden's Avatar
    Join Date
    Dec 2004
    Location
    illinois
    Posts
    978
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm having trouble getting rake to work with MySQL and locomotive.
    your brain reacts in the same way whether you are
    looking at something or thinking about it...

  12. #12
    SitePoint Enthusiast kyko's Avatar
    Join Date
    May 2006
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use Mac but have a *nix background so i compile all that from source. My current setup allows me to use either lighttpd or mongrel (or webrick) but neither are necessary becuase WEBrick comes with ruby and will work for basic needs. I like apache alright for certain things but i find it to be overkill for Ruby development. To find out how to do it from source you can go to http://hivelogic.com/articles/2005/1...pd_mysql_tiger

    If you don't like Lighttpd/FastCGI, you can skip it if you want. If you know how to do things like this from the command line, it will much easier for you when you want to deploy your app so i highly recommend it.
    Stop Global  


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
  •