Hacker News new | ask | show | jobs
by dangrossman 5694 days ago
You had a good experience. Lots of people don't. Getting the environment set up took me hours, and I'm a programmer. First I installed Ruby with my distro's package manager. Then I followed the instructions in the book and installed gem from the RubyGems website. Uhoh, not supposed to do that anymore, Ruby comes with a different version of gem. The new Rails website tells me I need a different version of Ruby, the one my distro installed doesn't work with Rails 3. Remove Ruby, try to remove the rubygems-I-shouldn't-install-myself, start over. Install the latest Ruby, then rails from the gem. Try to install some gems I will need, they won't compile. Ruby was compiled without support for some library. Go find, compile and install that library, then recompile Ruby with that feature (after researching how to compile specific libraries into it), and retry installing the gem. OK, on to the next gem, which needs another missing library. How did Ruby even compile if all these necessary libraries weren't there? Continue like this for hours until I finally have Rails and the few gems I'll need working and can see the default page on a web server.

Simply following your two step instructions on any of my servers would not create a working RoR setup.

4 comments

That's really a comment about your distro, not about Ruby or Rails. It /should/ be as simple as installing Ruby, then `gem install rails`. If it's not then something is broken with your distro's package.
mac osx, same amount of bullshit. its great when it works, sometimes it just doesnt and you have to do random shit to make it work.
Rails has been bundled with the developer tools for MacOSX since 10.5 - I admit that it was a bit annoying if you were compiling Ruby yourself in days prior.
Right - my issue was with the MySQL gem. The entire system is great because you can type

"gem install mysql" or whatever and it just works.

But the issue comes in when it doesn't work, which it didn't for me. It took hours of debugging. MAMP gets me up and running in < 5 minutes. A proper LAMP setup takes me < 10 minutes. I'm failing to see the advantage of Rails (at least from a setup standpoint) when it works perfectly most of the time, but fails so hard.

For years, this was the most common interchange in #rubyonrails:

- I can't get rubygems to work.

- You've used a Linux package manager to install Ruby haven't you? Don't, it's broken. Uninstall it and re-install from source.

Then follows a discussion about how the person with the problem doesn't want to do that, and the other people telling him fine, suit yourself.

The person with the problem continues to try to solve this problem some other way, but in the end either follows the previous recommendation, or stops messing with Ruby altogether.

Nowadays, Linux package managers offers the option of installing the "full" Ruby distribution, which is great, but I wonder why anyone would ever want to install the partial broken one. I don't even know if the "full" one works. :-/

I found Homebrew really helped out on the Mac.

I've had my problems with rails installations, but they were generally in trying to get specific rails code working- not getting a teaching instance up.

Let me guess.... debian?

Everywhere else it's totally sane.

Ironically enough, I've never ever had any problems with setting up a rails stack in Debian. Not my cup of tea distro, but some people I work with swear by it. I guess it has to do with all the stuff I do and preset when creating an image to base servers of.

Nevertheless, I've found Ruby and Rails easy to install in any machine I've tried them in (A LOT), and I guess that for less Unix inclined users it might get a bit complicated along the way.