Mac is actually a ruby development environment, but because of the low version, I still want to develop under the latest version, so I found the following installation upgrade method.
My system version is 10.6.8.
set up the path 1> edit the. profile file under the user path
2> Add the following at the end of the text
Export path= "/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin: $PATH"
3> save and close. Profile, execute the following command
SOURCE ~/.profile 4> Verify that path is updated, execute the following command, and if you see the path set by 2>, the setting is successful
Can download the latest version from Ruby Pipe Network (http://www.ruby-lang.org/)
Compile and install
1> Install Ruby
Unzip the downloaded Ruby package and enter the unpacked folder to execute the following command
(3) sudo make install
Verify Ruby Installation, execute the following command, if you see/usr/local/bin/ruby, the Ruby installation is successful
Which Ruby 2> installation RubyGems
Unzip the downloaded RubyGems package and enter the unpacked folder to execute the following command
3> installation RubyGems
sudo gem install rails
4> install MySQL gem (provided you have successfully installed MySQL)
sudo gem install mysql----with-mysql-dir=/usr/local/mysql translation Source (http://hivelogic.com/articles/ compiling-ruby-rubygems-and-rails-on-snow-leopard/)