Ruby notes (1)

Source: Internet
Author: User

Sharing the construction process of today's Ruby environment Aptana ide2.0 + Ruby 1.87 + rails2.1.2

~ Vasdaqtv Development Environment setup manual WindowsXP workshop ~

0. Prerequisites
0-1. This order book describes the building environment of "WindowsXP.

1. Prerequisites
1. Windows Update

2. Firefox
Http://mozilla.jp/firefox/
Firefox update

3. Install

Double-click 3-1.wrar393j.exe and install it as instructed.
Http://www.skycn.com/soft/3475.html

3-2. ruby1.8.7
On "c」", freeze ruby-1.8.7-p302-i386-mswin32.zip.
My computer> right-side Navigation Pane> Properties> high availability> Environment Variables
The environment variable path adds the following values.
C: \ ruby-1.8.7-p302-i386-mswin32 \ bin 」

3-3. rubygems1.3.5 Installation
In C: \ rubygems-1.3.5release, click "rubygems-1.3.5.zip 」.
Run the following commands.
C: \ rubygems-1.3.5
C: \ rubygems-1.3.5> Ruby setup. Rb

3-4. Various gem packages
Gem install rails-V 2.1.2
An error occurred while obtaining the gem install builder-V 2.1.2-Doc, indicating that the action is correct.
Gem install gettext-V 1.93.0
Gem install gruff-V 0.3.6
Gem install hpricot-V 0.8.2 or gem install hpricot -- platform = mswin32
Gem install rack-V 1.0.1
Gem install rubyzip-V 0.9.1
Gem install uuidtools-V 2.1.1
Gem install XML-simple-V 1.0.12

Gem install log4r-V 1.1.9

3-5. Compare the gem list with the following components. check whether there are any deficiencies.
Actionmailer (2.1.2)
Actionpack (2.1.2)
Activerecord (2.1.2)
Activeresource (2.1.2)
Activesupport (2.1.2)
Builder (2.1.2)
Gettext (1.93.0)
Gruff (0.3.6)
Hpricot (0.8.2)

Log4r (1.1.9)

Rack (1.0.1)
Rails (2.1.2)
Rake (0.8.7)
Rubyzip (0.9.1)
Uuidtools (2.1.1)
XML-simple (1.0.12)

3-6. Install Aptana Studio
Install aptana_studio_setup_2.0.5.exe as instructed.

3-7. Rad rails Installation
Start Aptana Studio, plug-ins from mystudio, and click radrails getit.

3-8. Install subclipse
Start Aptana Studio, plug-ins from mystudio, and click subclipse getit.
If an error occurs, avoid the following two checks.
・ Subclipse integration for mylyn3.x
・ Subversion revision Graph

4.ProgramTo obtain the token action confirmation.

4-1. Svn of Aptana Studio, which records the trunk and vasdaqtv_web checkout of the URL.
① File> New> Other> SVN repository explorer checkout [next]>
Newlocationcreate [next]>
Https://vasdaqtv.googlecode.com/svn?next]>
Trunk> vasdaqtv [finish] or trunk> vasdaqtv_cn/vasdaqtv_web [finish]

② Right-click the project name in the svnview> [checkout]
※The project name is displayed in the View of [radrails] after the project is successfully created.

4-1-2.aptana indicates that
① Character encoding
[Window]> [Preferences]>
[General]> [workspace]>
Text file encoding [other]> UTF-8> [OK]

② View Details
(1) [Window]> [show view]> [servers]> [OK]

(2) [Window]> [open perspective]>
[Other]> [SVN repository explorer]> [OK]

(3) [Window]> [open perspective]>
[Other]> [Team synchronizing]> [OK]

(4) [Window]> [open perspective]>
[Other]> [radrails]> [OK]

③ Add Server
In the [servers] view, click [Add Server]> [Rails]> confirm the required project name> [OK]

4-2. Fixed vasdaqtv_web/config/database. yml.

① Set the database below (development.

(Example: dev_001)
Development
Adapter MySQL
Database vasdaqtv_dev_001
Username dev_001
Password
Host vasdaqshanghai.dyndns.org
Encoding utf8
Socket var/run/mysqld. Sock
※Confirm your number

② MatchCode
[Ruby exproler] Right-click the project name changed by database. yml in the view and choose [refresh]

4-3. Table Creation

① Open [console shell] View
[Open console]> [open console shell]>
Confirm that the project name on the [console] view matches the name of the project you want to modify,
If it does not match the [display selected console]> select the project name you want to modify

② Instruction implementation
1. In the [console] view, enter the following information after the> MARK
Note: MySQL modifies the user's root host =%and restarts the MySQL server)
(1) rake DB: migrate: reset rails_env = Development

(1) when it ends, it appears again>. Then,

(2) rake DB: Import: Development
When it ends, it appears again>.

4-6. Start vasdaqtv_web
Use a browser to access http: // localhost: 3000 /.
The screen is displayed when the operation is successful.

※The username and password are required for the first SVN convention to be changed to confirm the manager.

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.