Configure Ruby on Rails and git on your Mac

Source: Internet
Author: User
Tags install homebrew openssl ruby on rails

Ruby on Rails on mac====================================================================================http:// general:useful: 0a58b188183b5100e3affor mysql: SERVER-SIDE/LANGUAGE/BUILD-RUBY-ENVIRONMENT-BY-RBENV/1. Install homebrew $ RUBY-E "$ (Curl-fssl https:// "2. Install Rbenv$brew installed Ruby-build$brew install  Rbenv Settings path$ echo ' Export path= ' $HOME/.rbenv/bin: $PATH ' ' >> ~/.bash_profile$ Echo ' eval ' $ (rbenv init-) ' >> ~/.bash_profile$ source. Bash_profile3. Install the possible tools, package 3.1 install sublime and configure the command line to open sublime olivierlacan/1195304 after installing sublime. Create a shortcut to it under/usr/local/bin so that you can run SUBL anywhere you want to start sublime$ln-s/applications/sublime\ text\ sharedsupport/bin/subl/usr/local/bin/sub3.2 Install Git$brew Install git3.3 use IRB (interactive ruby) package $ breW Install readline3.4 installs the package using HTTPS $ brew install OPENSSL4. Install ruby$ rbenv install-l determine the version of ruby$ rbenv installed 2.1.4 installation to use The version number used is set by the $ rbenv global 2.1.4. Assumptions are not set. Direct ruby-v see may be other version number $ rbenv versions confirm that $ ruby-v will show Ruby 2.1.4p265 (2014-10-27 revision 48166) [X86_64-darwin14.0]5. Install Rail S $ gem install rails$ gem install bundler$ rbenv rehash$ source ~/.bash_profile$ rails-v will display rails 4.2.16. Installing mysql$ Brew update$ Brew Install mysql$ Brew info MySQL confirm, also can mysql-version only see version number 7. Start rails$ Rails Server open http://localhost:3000 confirm Yes No success CTRL + C exit 8. Use mysql$ mysql.server start$ mysql-uroot Default no password assume you want to set password run the following statement $ mysql_secure_installation $ Mysql-uroot-p with Passwordmysql>exit exit $ mysql.server stop9. The second time you start your computer. Run Rails-v prompt is not installed, run ruby-v display is 2.0.0, run rbenv global 2.1.4 or unchanged.

Run Echo ' eval ' $ (rbenv init-) ' >> ~/.bash_profile (writes the rbenv initialization script to the file) (assuming insufficient permissions.) Change the file owner to user) $ source ~/.bash_profile (run the file) and then run Ruby-v and rails-v to be able. 10. Develop Ruby on rails Create the project and upload to github$git config--global "username" $git config--global [email protected] $git Config--global core.editor "subl-w"//config editor, here is Subl$subl ~/.netrc append below//assuming not run, each push requires input username and Passwordmachine Github.comlogin Usernamepassword password$rails New Larry-twitter//create APP$CD larry-twitter$ git init//will create Git in app folder Repo, larry-twitter$ git Add. $ git commit-m "Initialize repository" Web page on GitHub create repository, get https$ git remote add origin$ git push-u Origin master hypothesis bundle Install failed (OpenSSL dependent) to run the following command: Ruby_configure_opts=--with-openssl-dir=/usr/local/cellar/openssl/1.0.2h_1 rbenv Install 1.9.3-p551===================================================================================

Configure Ruby on Rails and git on your Mac

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: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.