Mac10.6.8 under Ruby Environment

Source: Internet
Author: User

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

VI ~/.profile

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

Echo $PATH

Download Ruby,rubygems

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

(1)./config--enable-shared--enable-pthread gflags=-d_xopen_source=1

(2) Make

(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

Sudo/usr/local/bin/ruby setup.rb

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/)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: