5 ms·
For Rails, "sudo gem update --system; sudo gem install rails" is not sufficient ?
by traxtech 14y ago
For Rails, "sudo gem update --system; sudo gem install rails" is not sufficient ?
- oscardelben 14y agoThis is targeted at beginners with little/no programming experience.
- tjoozeylabs 14y agocool
- adrianpike 14y agoIt'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.
- traxtech 14y agoI run Rails 3.2.3 with Ruby 1.8.7 on Snow Leopard without problems :)
- cmelbye 14y agoRight, 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.
- stephenhuey 14y agoWhen 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!
- moe 14y agoSeems 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 14y agoThis is correct, but replace 1.9.2-p290 with 1.9.3-p125.
- telemachos 14y agoPlus 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 14y agoThere'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 https://gist.github.com/2113359 Been using it at work for local dev and in production. Feels good, man.
- traxtech 14y agoThanks!
- deleted 14y ago