Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Trying to get Ruby on Rails up and running on a Mac. Impossible?

Options
  • 01-10-2017 9:17pm
    #1
    Registered Users Posts: 785 ✭✭✭


    Hi there, I'm trying to start working with Ruby on Rails on a Mac but it's proving very difficult. 

    I've tried to install it multiple times but tbh I think I messed it up. I was using this website http://installrails.com/steps/install_rvm_and_ruby 

    It was going smoothly but I started getting errors at Install RVM and Ruby

    I think it installed eventually but it's flawed. e.g. when I got to run rails g controller pages about home contact when I want to build the MVC it gives me an error. 

    Library not loaded:
    Reason: image not found

    I've been reading on Stack Overflow for the last couple of hours and I think it's a flawed install. Does anyone know how to uninstall Ruby/Rail and start from scratch?

    I also read it had something to do with the MAC OS not letting you work with Ruby as it uses for its own internal computing. Very difficult to get up and running compared to xCode. 

    Would it be easier to use it on Windows? (i.e. install it on my Mac with Bootcamp). Otherwise thinking of paying someone to set it up for me at this stage  
    Thanks


Comments

  • Registered Users Posts: 768 ✭✭✭14ned


    parc wrote: »
    Hi there, I'm trying to start working with Ruby on Rails on a Mac but it's proving very difficult.

    I got it to work once, but only after a day of hacking on it (I was being paid, so that was fine). I remember there were several occasions of editing internal OS X files as root and changing permissions of things and copying some files to new locations. Lots of black art stuff. But I got it eventually.

    On Windows, just install Linux Subsystem for Windows and install Ruby under the Ubuntu subsystem. It'll work great. No arsing around.

    Niall


  • Registered Users Posts: 785 ✭✭✭parc


    Thanks
    I've actually decided to start learning Python as it's (presumably) easier to get up and running. I can also do data analysis as well as development so it makes more sense to go with that


  • Registered Users Posts: 785 ✭✭✭parc


    Thanks
    I've actually decided to start learning Python as it's (presumably) easier to get up and running. I can also do data analysis as well as development so it makes more sense to go with that


  • Registered Users Posts: 785 ✭✭✭parc


    Thanks
    I've actually decided to start learning Python as it's (presumably) easier to get up and running. I can also do data analysis as well as development so it makes more sense to go with that


  • Registered Users Posts: 6,013 ✭✭✭Talisman


    OS X has system installed versions of Ruby and Python and you can really mess things up if you don't know what you're doing. Are you familiar with the Homebrew package manager? This would be the recommended method of installing a version of Ruby or Python for personal use.

    Setup Ruby On Rails on Mac OS X 10.11 El Capitan

    If you're looking to just use Python for Data Science the you need look no further than Anaconda.

    JetBrains offer a free version of their PyCharm IDE for hobbyists and students.


  • Advertisement
  • Registered Users Posts: 7,157 ✭✭✭srsly78


    Despite people saying "oh macs are unix compatible" this isn't really much use, linux itself isn't unix compatible - and linux is what all this stuff runs on. Using a mac or windows is only gonna make life difficult.


  • Registered Users Posts: 2,016 ✭✭✭Colonel Panic


    Nonsense. I run plenty of stuff you’d host on Linux on my Mac for development purposes and don’t even need a package manager.


  • Registered Users Posts: 768 ✭✭✭14ned


    srsly78 wrote: »
    Despite people saying "oh macs are unix compatible" this isn't really much use, linux itself isn't unix compatible - and linux is what all this stuff runs on. Using a mac or windows is only gonna make life difficult.

    It's more a BSD vs Linux thing than OS X vs Linux. OS X is derived from BSD, most of the issues stem from BSD differences, specifically that it's not as well tested as Linux.

    I run FreeBSD (specifically TrueOS) as my main Unix environment. It's great. Highly recommended for seeing how Linux ought to have been.

    Niall


  • Registered Users Posts: 2,415 ✭✭✭Singer


    srsly78 wrote: »
    Despite people saying "oh macs are unix compatible" this isn't really much use, linux itself isn't unix compatible - and linux is what all this stuff runs on. Using a mac or windows is only gonna make life difficult.

    Both Linux and MacOS are both fully certified UNIX systems:
    https://www.opengroup.org/openbrand/register/apple.htm etc.

    It is effort to maintain both MacOS (development) and Linux (production) Ruby on Rails stacks, but it's perfectly workable - it's exactly what my workplace does.


  • Registered Users Posts: 768 ✭✭✭14ned


    Singer wrote: »
    Both Linux and MacOS are both fully certified UNIX systems:
    https://www.opengroup.org/openbrand/register/apple.htm etc.

    It is effort to maintain both MacOS (development) and Linux (production) Ruby on Rails stacks, but it's perfectly workable - it's exactly what my workplace does.

    That means little. Windows NT 3.5 was a fully certified Unix implementation with a conforming POSIX implementation. Indeed, they've resurrected that subsystem for the Windows 10 Subsystem for Linux, it was always there, it always worked.

    (For example, you can fork() a Win32 process just fine, NT implements it perfectly. The Win32 layer dies very very horribly though, it can't cope)

    Niall


  • Advertisement
  • Registered Users Posts: 7,157 ✭✭✭srsly78


    Singer wrote: »
    Both Linux and MacOS are both fully certified UNIX systems:
    https://www.opengroup.org/openbrand/register/apple.htm etc.

    It is effort to maintain both MacOS (development) and Linux (production) Ruby on Rails stacks, but it's perfectly workable - it's exactly what my workplace does.

    It may work for easy stuff like that, but not for anything serious. Noone runs macos on servers ffs.


  • Registered Users Posts: 6,013 ✭✭✭Talisman


    srsly78 wrote: »
    It may work for easy stuff like that, but not for anything serious. Noone runs macos on servers ffs.
    Yes they do. GoDaddy were offering Mac OS X hosting in 2009, they wouldn't do so unless there was a demand for such a service.


  • Registered Users Posts: 2,030 ✭✭✭colm_c


    These days, I end up using vagrant for these very reasons and commit the config file to the git repo so everyone on the team has the right environment setup.

    Usually mirroring the production setup.

    Also means I can nuke my environment or Mac and rebuild it easily.


  • Registered Users Posts: 2,415 ✭✭✭Singer


    srsly78 wrote: »
    It may work for easy stuff like that, but not for anything serious. Noone runs macos on servers ffs.

    My workplace has a serious enough RoR app (7779 files containing Ruby and 463533 lines of code according to cloc), and developing the app on Mac and deploying to Linux is how we work. It is a bit of effort to maintain, but it works fine. It's easy enough for smaller apps. Agreed that nobody runs MacOS on servers. Someday Linux on the desktop will render that irrelevant ;)


  • Closed Accounts Posts: 4,763 ✭✭✭Fenster


    I've developed ROR on Macs for the last two years. The toolchain is a bit fiddly to set up, but:

    1. Install RVM.
    2. Install Homebrew
    3. ???
    4. Profit!


  • Moderators, Business & Finance Moderators Posts: 10,008 Mod ✭✭✭✭Jim2007


    OP, as others have said both Ruby and Python are preinstalled on the Mac and yes you have probably stuffed it up by your attempts at installing it again. I have found in the past that installing a trial version of RubyMine can help some people sort it out. RubyMine is able to detect some of the issues and either prompt you with better error messages or in some cases even fix the issues.
    Singer wrote: »
    Someday Linux on the desktop will render that irrelevant ;)

    For thirty years now I've been hearing about how one flavour or another on UNIX is the up and coming desktop OS, at this stage I'm certain it will not happen in my lifetime!


Advertisement