In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you how to install rails, I hope you will learn something after reading this article, let's discuss it together!
Began to learn rails, the first step is to learn how to build a good environment, I use the mac-pro,Mountain Lion version.
1. Install homebrew: (homebrew is a package management tool under mac system, similar to rpm, etc.)
Ruby-e "$(curl-fsSL https://raw.github.com/mxcl/homebrew/go)"
2. Install rbenv with your homebrew: (rbenv is used to manage ruby versions, similar to rvm)
Brew install rbenv
3. Create a file for your rails project
Mkdir ~ / Learning/rails
4. Create .rubyversion file, and add the version you want to install
Vim .rubyversion
5. Check your local ruby version with:
Rbenv local
6. Install your ruby:
Rbenv install 2.0.0-p247
Since you are installing the latest 2.0.0-p247, you may encounter some problems. If you use mountain lions like me, you need update your OpenSSL and ruby build with:
Brew update & & brew install openssl
Brew upgrade ruby-build
After that, you can continue with the operation in step6
7. Install your rails with gem:
Gem install rails
Of course, if the network is shabby, you can use other rubygems images, such as Taobao (gem downloads relevant bao packages from https://rubygems.org/ by default)
Gem sources-- remove https://rubygems.org/
Gem sources-a http://ruby.taobao.org/
After that, you can view the result of the modification through gem sources-l
8. Start your rails life
Rails *
Of course, if you still can't use rails command, you need to use bundle to operate. Bunlder is a class library based on ruby, but it is also a kind of gem, but this gem can be used to manage other gem. Moreover, when you use bundle exec rails, it will only operate in the current directory, will not affect anywhere else, and is relatively safer.
Brew install bundler
Bundle install
Bundle exec rails *
After reading this article, I believe you have a certain understanding of "how to install rails". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.