News for hackers. Stuff that matters.
Re:Show HN: Rails One Click Installer for Mac Os X by traxtech on Saturday April 14, 2012 @01:27PM (#3841433)
For Rails, "sudo gem update --system; sudo gem install rails" is not sufficient ?
Re:Show HN: Rails One Click Installer for Mac Os X by moe on Saturday April 14, 2012 @02:39PM (#3841630)
Seems like I should post my famous 5 lines again:

1. Install XCode and homebrew

2. sudo brew install {postgresql,rbenv,ruby-build}

3. Close terminal. Open terminal.

4. mkdir proj && cd proj && rbenv install 1.9.2-p290 && rbenv local 1.9.2-p290

5. gem install rails && rbenv rehash

6. rails new foo

That should get you up and running on any OSX with a sustainable environment (i.e. one that you can actually reproduce in the future and that can mimic your live servers).

Re:Show HN: Rails One Click Installer for Mac Os X by philwelch on Sunday April 15, 2012 @01:02AM (#3842839)
> sudo brew install

No sudo. From https://github.com/mxcl/homebrew/wiki/FAQ:

> Why does Homebrew say sudo is bad? > tl;dr Sudo is dangerous, and you installed TextMate.app without sudo anyway.

> Homebrew is designed to work without using sudo. You can decide to use it but we strongly recommend not to do so. If you have used sudo and run into a bug then it is likely to be the cause. Please don’t file a bug report unless you can reproduce it after reinstalling Homebrew from scratch without using sudo.

Re:Show HN: Rails One Click Installer for Mac Os X by getsat on Saturday April 14, 2012 @02:53PM (#3841669)
This is correct, but replace 1.9.2-p290 with 1.9.3-p125.
Re:Show HN: Rails One Click Installer for Mac Os X by telemachos on Saturday April 14, 2012 @08:57PM (#3842423)
Plus falcon patches? Here's a ruby-build formula for that:

    $ cat share/ruby-build/1.9.3-p125-falcon
    ## Hat tip to @burkelibbey and @metaskills - who did all the real work
    
    build_package_combined_patch() {
      local package_name="$1"
    
      {
        curl https://github.com/ruby/ruby/pull/47.diff | git apply
        curl https://raw.github.com/gist/1859082/performance_and_backport_gc.patch | patch -p1
        autoconf
        ./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
        make -j 8
        make install
      } >&4 2>&1
    
    }
    
    CC=$(which clang) install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
    CC=$(which clang) install_package "ruby-1.9.3-p125" "http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz" combined_patch
Re:Show HN: Rails One Click Installer for Mac Os X by getsat on Saturday April 14, 2012 @09:45PM (#3842493)
There's this gist which combines all the patches and has you install a 1.9.3-p125-perf via rbenv: https://gist.github.com/2113359

Been using it at work for local dev and in production. Feels good, man.

Re:Show HN: Rails One Click Installer for Mac Os X by traxtech on Saturday April 14, 2012 @02:56PM (#3841673)
Thanks!
Re:Show HN: Rails One Click Installer for Mac Os X by stephenhuey on Saturday April 14, 2012 @02:27PM (#3841593)
When I returned to Rails after a couple of years away from it, I had to piece together a few different blog posts about setting up Rails 3 with Ruby 1.9 on Mac OS X to get my toolchain working, and even then I had to troubleshoot version-specific problems not covered in the blogs. I believe most beginners would have been deterred from continuing. I don't really use Rails on Windows much at all, but tried RailsInstaller on Windows 7 just for fun about a year ago and was delighted it worked so well and would like for beginners to have such an easy experience on a Mac, my OS of choice!
Re:Show HN: Rails One Click Installer for Mac Os X by adrianpike on Saturday April 14, 2012 @01:30PM (#3841446)
It's not. At the very least, you'll want to upgrade to a 1.9 version of Ruby - even in 10.7, I'm pretty sure it still comes out of the box with 1.8.7.

Also, most of the Ruby or Rails developers I know use either rvm or rbenv to have multiple versions of Ruby installed side by side.

Re:Show HN: Rails One Click Installer for Mac Os X by traxtech on Saturday April 14, 2012 @01:33PM (#3841457)
I run Rails 3.2.3 with Ruby 1.8.7 on Snow Leopard without problems :)
Re:Show HN: Rails One Click Installer for Mac Os X by cmelbye on Saturday April 14, 2012 @01:50PM (#3841508)
Right, and that's the last release series that will support 1.8.7. Thus, you'll want Ruby 1.9 eventually. Besides Rails compatibility, 1.9 is faster, includes lots of nice new syntaxes and methods for doing things, better encoding support, etc.
Re:Show HN: Rails One Click Installer for Mac Os X by Argorak on Saturday April 14, 2012 @02:21PM (#3841583)
Also, 1.8.7 EOL is so close that you should not choose it for new projects.
Re:Show HN: Rails One Click Installer for Mac Os X by traxtech on Saturday April 14, 2012 @02:55PM (#3841672)
My MacBook EOL is also very close, I'm waiting for the new Apple hardware releas. I'll switch them both together : Christmas waaaaay before Christmas.
Re:Show HN: Rails One Click Installer for Mac Os X by oscardelben on Saturday April 14, 2012 @01:29PM (#3841444)
This is targeted at beginners with little/no programming experience.
Re:Show HN: Rails One Click Installer for Mac Os X by tjoozeylabs on Saturday April 14, 2012 @04:35PM (#3841916)
cool