Configure the ROR environment in Ubuntu and install Aptana (based on Eclipse)

Source: Internet
Author: User

Is an integrated development environment for Web applications. Based on Eclipse, Ror is well supported. It can be installed independently, but this article will choose to install it as the Eclipse plug-in. To use it, you must first set up the ROR environment.

Step 1: Install Ruby.

$ Sudo apt-Get install ruby-full

After the installation is complete, run $ ruby-V. If you see the version number, it will be correct.

Step 2: Install rubygems.

$ Sudo apt-Get install rubygems

After the installation is complete, run $ gem-V. if the version number is correct.

If not, the system prompts that the software is not available, take the first three steps and try again.

Step 3: Install rails.

$ Sudo apt-Get install rails

After the installation is complete, run $ rails-V. If you see the version number, it will be correct.

Step 4: Install ruby-debug-base and ruby-debug-ide

These two gems are used for debugging.

$ Sudo gem install ruby-debug-Base

$ Sudo gem install ruby-debug-ide

Step 5: Install git.

$ Git: Check whether the installation is successful. If not, run the following command.

$ Sudo apt-Get install git

After the installation is complete, run $ git -- version. The version is correct.

Step 6: Install.

Rvm is a command line tool. It will be used by the supervisor in Aptana Studio after installation. None of my previous installation experiences have been installed.

(I don't know what it is. Now I only know that $ rvm install 1.9.2 can be used between two versions of Ruby after environment variables are set .)

$ Bash <(curl http://rvm.beginrescueend.com/releases/rvm-install-head

If the system prompts that curl is not installed, run $ sudo apt-Get install curl and try again. After the installation is complete, $ rvm-V will still prompt that the installation is not complete and you need to set environment variables.

There is a hidden file under the user directory. bashrc (CTRL + H show/hide), open it and add it in the last line:

Export Path =/home/wangbengen/. rvm/bin: $ path

Now $ rvm-V is correct.

Step 7: Install mongrel. (Skip this step if you want to use the default webrick)

This is a web server. When installing rails, a server named webrick has been installed, but mongrel is more suitable.

$ Sudo gem install mongrel

After installation, you can use $ gem list. Check all installed gems, including mongrel.

Step 8: Install MySQL. (Skip this step if you want to use the default sqlite3)

$ Sudo apt-Get install mysql-Server

$ Sudo apt-Get install phpMyAdmin

By default, the root password is blank, because it is a personal development environment, so leave it empty. (Note: I have not tried installing MySQL this time because I have already installed mysql .)

Step 9: Install subversion.

This is the version controller.

$ Sudo apt-Get install Subversion

Step 10: Install Aptana Studio 3.

Prerequisites: You have installed eclipse 3.5 or later.

Open eclipse. Menu help-& gt; install new software..., enter the http://download.aptana.com/studio3/plugin/install in the work with input box, and then next... finish... restart cclipse and OK.

Everything went well? You can create a rails project and try it out. File-& gt; New-& gt; rails project. Enter name to finish. Open the project and you will see a fixed directory structure, which has been created. Do not do anything. Right-click the project-& gt; run server. Enter http: // localhost: 3000/in the browser.

Note: click "about your application's environment" and you will see that the MySQL database is not used yet. In this case, you need to configure the target database. yml file and then create the corresponding database. I used the MySQL graph.

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.