Build a Ruby environment under Linux Mint 17

Source: Internet
Author: User
Tags linux mint

Build a Ruby environment under Linux Mint 17

Build a Ruby environment under Linux Mint 17

1. Environment Construction

Install curl

Sudo apt-get install curl

Install RVM (Ruby Version Manager)

Curl-sSL https://get.rvm.io | bash-s stable

Install ruby

Rvm install ruby-1.9.3-p545

Install bundler

Gem install bundler

(If You Want To uninstall the app installed with gem, first gem list, and then gem uninstall app_name)

Download a project from github.

Git clone git@github.com: abruzzi/letusgo-server.git

Go to the folder

Cd letusgo-server

Update Project dependencies (the Gemfile. lock file must exist, and bundle install is similar to nodejs's npm install)

Bundle install

So far, the ruby environment has been set up (ps: Sinatra is used for the framework of the project ).

2. Applications

Go to the letusgo-server folder and run

./Setup. sh

If no exception occurs, you will see:

= CreateProducts: migrating ================================================= ============
-- Create_table (: products)
-> 0.0009 s
= CreateProducts: migrated (0.0010 s) ==========================================================

Then run shotgun.

In this case, the server is Enabled:

= Shotgun/WEBrick on http: // 127.0.0.1: 9393/
[20:20:41] INFO WEBrick 1.3.1
[20:20:41] INFO ruby 1.9.3 () [i686-linux]
[20:20:41] INFO WEBrick: HTTPServer # start: pid = 18420 port = 9393


Now, the Sinatra framework has been deployed. You can enter http: // 127.0.0.1: 9393/in the browser.

Tip: The above installation commands do not require sudo. You only need to execute them under the current user.

Iii. References

1. [Sinatra] (http://www.sinatrarb.com/) as Web Server
2. [ActiveRecord] (http://api.rubyonrails.org/classes/ActiveRecord/Base.html) as ORM
3. Sqlite3 as database (single file database)
4. [RSpec] (http://rspec.info/) as unit test framework
5. [Rake] (https://github.com/ruby/rake) as build tools
6. RVM installation instructions

How to traverse objects in a specified directory in Ruby

Build Ruby On Rails in Ubuntu

Build Ruby on Rails on Ubuntu 13.10

Ruby on Rails 4 Tutorial Chinese Version HD complete PDF

Ruby details: click here
Ruby: click here

This article permanently updates the link address:

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.

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.