Live data from Hacker News

The First Step for Ruby on Rails

jamesjohnson.me

21–30 of 40 posts

Re: The First Step for Ruby on Rails

#23

Earlier quoted context omitted.

rvm still has more traction in the community and the end result is going to be very similar to rbenv for the majority of users--except that rvm has a built-in rubies installer + gemsets, which can make things easier for beginners to dive in and access other projects. New users should probably stick to rvm.

I tend to think that rvm is overkill for beginners. If you're really just getting started, installing ruby and rubygems is what you should stick to and adding steps like "install rvm" "install a ruby" "create a gemset" just add potential points of failure and frustration. What is it about having gemsets that makes it easier for a beginner? Bundler seems to handle installing dependencies just fine.

gemsets are especially important for beginners that will be trying out lots of different codebases with different gem dependencies.

With rvm you can create a gemset just for that project youre testing out. Imagine trying to work with different projects that have different versions of ruby, different versions of rubygems and different versions of rails, some gems from github, some gems from source, some gems from rubygems.

A beginner would not be able to sort through the dependency mess this creates. Gemsets help you avoid this nightmare.

Re: The First Step for Ruby on Rails

#24
post #11

Earlier quoted context omitted.

I hate to single you out, but it's become really hard for me to listen to any Ruby developers decry "magic" as a bad thing in RVM. RVM is an excellent tool that was taken down a notch by a hit job needlessly perpetrated by the author of rbenv. RVM is no more magic than rbenv, and to listen to Ruby developers (who treasure "magic") talk about it as if RVM commits some cardial sin by overriding `cd` tops out my nerd-ra…

Monkey patching in ruby has well-known problems (what happens when two libraries patch the same object?), and now good library maintainers know not to monkey-patch standard libraries. Neither should RVM. The monkey-patching of `cd` is the main reason I'm not using RVM. I depend on `cd` to work, every time, rock solid, especially when my system is unstable. I can't risk having a dependency or bug in their `cd` script…

Can you explain to me how did RVM cause cd to interfere with your work experience? Im curious because Ive been using it forever and other than it executing my .rvmrc files, havent noticed a bit of difference

Re: The First Step for Ruby on Rails

#25

copy and paste in the following command: /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" It is getting more and more popular to come across such installation recipes. "Just execute this command", which will download some code from the net and run it on your machine. Yes, it's easy and quick but it's terribly insecure, especially without HTTPS. Just take a look at http://npmjs.org . Just imagine th…

At some point you're downloading something and executing it. Unless you pick through all of the source code or decompile the binaries you download, you could get caught at any stage.

For a beginner, it makes no difference if they get burnt by a gist or by a compromised package or binary. And they can at least attempt to read https://raw.github.com/gist/323731 in plain text.

Re: The First Step for Ruby on Rails

#26

Nice guide, I wish I had it when I first started rails. However, vim? I love vim, and suggest everyone learns it. But if the point of a guide is to teach the basic installation of ROR, I wouldn't suggest making them open vim, too.

especially when it can be replaced with one line

echo "[[ -s $HOME/.rvm/scripts/rvm ]] && . $HOME/.rvm/scripts/rvm" >> ~/.bashrc

Re: The First Step for Ruby on Rails

#27
A nice style, but for beginners, why would you suggest going into Vim (or any editor) with the potential for screwing up? Even RVM's actual installation documentation says to just do this:

  echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
(from http://beginrescueend.com/rvm/install/)

Re: The First Step for Ruby on Rails

#29
post #20
post #16

I did the step up to "[[ -s $HOME/.rvm/scripts/rvm ]] && . $HOME/.rvm/scripts/rvm", and then tried "rvm install ruby-1.9.2-p290" but it said "rvm: command not found". Ideas?

I dont belive that bashrc is being executed on a mac as standard. Try: source ~/.bashrc If that worked add this to your .bash_profile [ -f ~/.bashrc ] && . ~/.bashrc

Yes, that worked! I am on OSX Lion.

Re: The First Step for Ruby on Rails

#30

Earlier quoted context omitted.

I tend to think that rvm is overkill for beginners. If you're really just getting started, installing ruby and rubygems is what you should stick to and adding steps like "install rvm" "install a ruby" "create a gemset" just add potential points of failure and frustration. What is it about having gemsets that makes it easier for a beginner? Bundler seems to handle installing dependencies just fine.

gemsets are especially important for beginners that will be trying out lots of different codebases with different gem dependencies. With rvm you can create a gemset just for that project youre testing out. Imagine trying to work with different projects that have different versions of ruby, different versions of rubygems and different versions of rails, some gems from github, some gems from source, some gems from ruby…

Gemfiles and bundler solve the same problem, in a way that works with Rails and gem development and that doesn't require extra stuff jammed into your shell.
Post reply on HN