Live data from Hacker News

The First Step for Ruby on Rails

jamesjohnson.me

11–20 of 40 posts

Re: The First Step for Ruby on Rails

#11

After using rvm, I'd suggest using rbenv ( https://github.com/sstephenson/rbenv ) instead. It doesn't try to do as much, so a little less magic. The biggest thing I like is that it doesn't try to do anything with gems, which is good - I've been trying to use bundler for everything.

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 breaking my most commonly used shell command.

rbenv has demonstrated that it's not necessary to override `cd` to manage ruby versions, so why does RVM still do it?

Re: The First Step for Ruby on Rails

#12

I've been following through the online version of Michael Hartl's RoR book: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book It's proven to be a GREAT way to learn the basics from the ground up while building an actual app at the same time.

I wrote a book called "Rails 3 in Action" for getting started with Rails. Obligatory link: http://manning.com/katz

The idea behind it was to have more focus on BDD than anything else out there, which is exactly what the community is all about these days.

Just like Michael's brilliant book, we go through building an application from the ground up using Rails 3.1, RSpec, Cucumber and many other gems provided by the community.

Re: The First Step for Ruby on Rails

#13

I've been following through the online version of Michael Hartl's RoR book: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book It's proven to be a GREAT way to learn the basics from the ground up while building an actual app at the same time.

Ruby on Rails Tutorial is awesome. Even though I went through most of the Agile book years ago, going through the Tutorial helped me: get up to speed with newer versions of Rails, learn the basics of git, and see how test-driven development is done.

Re: The First Step for Ruby on Rails

#14

  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 the results if npmjs.org gets compromised. This trend is troubling.

Re: The First Step for Ruby on Rails

#15

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…

I feel the same way, but you are putting the same amount of trust in external services when you run something like 'npm install' already.

And don't forget that something like:

git clone .... sudo make install

is a huge hole for bad things to happen as well.

Re: The First Step for Ruby on Rails

#17
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?

did you restart your terminal session? I believe that's the next step. did you make sure your bashrc wasn't returning before that bit was executed?

Re: The First Step for Ruby on Rails

#18

I've been following through the online version of Michael Hartl's RoR book: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book It's proven to be a GREAT way to learn the basics from the ground up while building an actual app at the same time.

Thanks! Glad you like it. As you probably know, there's already a Rails Tutorial chapter (and screencast) on Rails 3.1, but I'm also working on a full 3.1 update as well. Look for the new book in November or December, with the screencasts to follow a couple of months later. Sign up for the news feed for the latest updates: http://feeds.feedburner.com/railstutorial

Re: The First Step for Ruby on Rails

#19
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?

did you restart your terminal session? I believe that's the next step. did you make sure your bashrc wasn't returning before that bit was executed?

Yep to both.

Re: The First Step for Ruby on Rails

#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

Post reply on HN