

Show HN: Rails One Click Installer for Mac Os X - oscardelben
https://github.com/oscardelben/RailsOneClick

======
CWIZO
Hmm there was this a couple of weeks ago:
[http://www.kickstarter.com/projects/1397300529/railsapp?ref=...](http://www.kickstarter.com/projects/1397300529/railsapp?ref=live)

I guess you don't need $44,219 to make "rails simple again".

~~~
tptacek
What a stupid comment. $44,000 is ~2/5ths of a Sr. Rails Dev's salary. If
Engine Yard, Github, Joyent or Force/Heroku announced that they were going to
furlough one of their senior devs to work for 5 months on the best possible OS
X Rails installer, we'd be cheering them on.

But Yehuda Katz has the temerity to suggest that working directly for his end-
users might be a good way to accomplish the same goal, and for that, earns
snarky bullshit like this.

~~~
atomical
Where is the proof that rails is hard to install and needs 5 months of work?
Maybe more documentation is needed on best practices but 5 months of work for
a specialized installer? No thanks.

~~~
egypturnash
Here's some anecdotal evidence.

I spent a day recently trying to install Rails on my Air. I fiddled with it
once back when Locomotive worked. I was expecting a nice clean drag-n-drop
like that or MAMP. Instead I wasted half the day with broken Locomotive, then
spent the rest of the day installing the dev tools (which space I can ill
spare on my Air) and getting it running. I lost all desire to actually fuck
wih it during that time. Now I want to nuke it because something's eating up
all my free space and it started a little after I installed ROR. And I have no
fucking idea where to start aside from just flushing the machine and restoring
apps/data from backup.

So that's one piece of any data from a frustrated artist/occasional hobby
coder who really never wants to touch the command line in her life. This is
what it's like for a noob: scary, frustrating, and confusing.

~~~
kelnos
So, uh... I'm a little confused here.

About a year ago I opened a terminal on my Mac and typed:

    
    
        $ gem install rails sqlite3-ruby
    

I waited a few minutes for it to finish, then made a new directory, created a
new rails project, ran 'rails server', opened a browser, and it worked.

Has this changed dramatically? I'm not talking about people who want to test
out 5 different versions of ruby and rails simultaneously. I'm just talking
about the basic first-time rails developer who wants to get a rails env up and
running quickly (which is explicitly the audience for this one-click
installer).

If you want or need ruby 1.9.x, then that's a little more work. Install
homebrew or MacPorts or whatever and install 1.9 through that, make sure that
guy is first in the PATH, and then do the 'gem install' dance. But this is
hardly something that needs 5 months of work and $40k to accomplish.

~~~
TorbjornLunde
I had to use RVM and edit some config files in order to get Rails to run at
all. Might not be a big deal of people who are used to that kind of thing, but
it did not make a good first impression to beginner like me.

This doesn’t seem to be isolated to Rails though, Django seems to have gotten
harder. I actually gave up installing Django due to a localization bug.

------
oscardelben
Author here. I hope this can help the community, especially Yehuda with his
own one click installer project.

~~~
telemachos
Have you seen Jeremy McAnally's Railcar[1]? It might be worth a look since
there seems to be some overlap in goals (even if maybe not in how you get
there).

 _Edit_ : Here's a link to JM's blog post explaining his choices for
Railcar[2].

[1]: <https://github.com/arcturo/Railcar>

[2]: [1]: [http://omgbloglol.com/post/20783445544/on-railcar-an-
isolate...](http://omgbloglol.com/post/20783445544/on-railcar-an-isolated-
rails-environment)

~~~
oscardelben
I hadn't. What I want to make though is a sandboxed environment that doesn't
use rvm, etc and that provides everything you need. I also want to make an
interface for beginners to easily run the server, execute commands, etc.

~~~
jeremymcanally
That's pretty much what I've built. I just use RbEnv to setup the environment
for each version of Ruby installed. Running the server, etc. is already built.

~~~
oscardelben
I looked at your project and it looks very nice indeed. Nice work.

------
nachteilig
This looks like a nice idea, but I'm echoing others in wondering why this is
necessary. Tools like RVM make it fairly trivial to maintain distinct versions
of rails, associated gems etc.

The author might make this more compelling by sandboxing things like nginx,
unicorn, etc. (in the path that MAMP and such have taken) that are a bit more
of a pain to manage independently on OS X.

~~~
jeebus
I agree. This seems at this time to focus on the already easy to
install/configure parts (a Ruby build and Rails gem) and not the harder items
(like Nginx).

------
sil3ntmac
I prefer to use rvm :)

    
    
        curl -L get.rvm.io | bash -s stable
        source ~/.bash_profile
        rvm install 1.9.3
        gem install rails

~~~
wolframarnold
Yeah, I would agree strongly. The folks who'll use this are beginners and
nothing sucks more than having some weird one-off environment that nobody else
uses. I teach a lot of Ruby classes and I always tell people to do things in
the most common way. That way, if they need help, the people helping them will
feel right at home, and anything the beginners might google themselves will
also apply. This is not the case if your one click installer doesn't follow
the most common paths. It's convention over configuration, remember? Lastly,
what I've been missing in the one click installer discussion is
maintainability and upgradability. This is exactly the problem that brought
about tools like bundler, rvm, homebrew or Debian/Ubuntu packaging.

~~~
egypturnash
Sssooooo yeah. Let me speak for the beginners such as myself.

A week or two before Yehuda announced his KS, I decided I wanted to fuck
around with ROR. I blew like a half a day wrestling with Locomotive. Then I
followed... some reciepe, I couldn't tell you where I found it.

By the time I got that working I had blown the whole day. And I had no energy
to actually try, you know. Fucking with ROR. I still haven't.

And ever since I did this, I've been having problems with something filling up
the limited space on my Air. When I reboot it goes back to normal, but within
a week I've got my computer bitching about being out of space.

Is it something my installation of ROR and it's support infrastructure is
doing? Hell, I don't know. And since I honestly have no idea what exactly I
installed where, it's pretty much impossible for me to uninstall ROR and it's
infrastructure to find out if it's the cause.

If I'd been using a self-contained package like MAMP (or like what Locomotive
used to be) then I'd be able to nuke it at the drop of a hat instead of
spending a day or two trying to piece together what I did, try to remove a ton
of command-line packages, and hope I don't accidentally kill off something my
machine actually depends on for basic operation.

I think it is very very important for beginners to be able to say "gee I
didn't get into this and I need space" and quickly remove it. Your method of
using "the most common way" is very hostile to this.

~~~
sil3ntmac
rvm lets you very easily uninstall _everything_ :

    
    
        rvm implode

~~~
egypturnash
oh man thank you!

 _runs to her terminal_

tealfour:~ egypt$ rvm implode -bash: rvm: command not found

Well poop. Thanks anyway!

~~~
sil3ntmac
Haha. Did you follow the install instructions and append that "[...] && ..."
line to your .bashrc? It is necessary to load rvm into your console.

------
traxtech
For Rails, "sudo gem update --system; sudo gem install rails" is not
sufficient ?

~~~
moe
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).

~~~
getsat
This is correct, but replace 1.9.2-p290 with 1.9.3-p125.

~~~
telemachos
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

~~~
getsat
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.

------
holgersindbaek
This is great. Have just been installing rails on 3 friends macs, cuz' I'm
working on a project with them - Meer.li - and it is such a terrible
experience each time. Looking forward to what this can become.

------
fieldforceapp
How would this compare to say the BitNami RubyStack, I've been using this to
keep multiple Rails version (2.x and 3.x) running on Lion:

<http://bitnami.org>

------
raghavb
This should hopefully help in eradicating "Chapter One: Installing Rails" from
most Ruby on Rails books. Perhaps one of the the most frustrating chapters
that someone beginning to learn Rail's faces.

~~~
graywh
Because everyone develops Rails in OS X? I hate that assumption.

------
rickdale
Love it. Ideas like this make the first step that much more welcoming.

------
jacktang
rvm or JewelryBox should be fine to me under Mac OS x

