Getting started with Ruby on Rails development using radrails

Source: Internet
Author: User
Tags ruby on rails

Over the past few days, according to the book "using rails to develop agile Web Applications", I have also learned some Ruby on Rails knowledge, which is quite interesting, but not as fun as I imagined, for example, I encountered some problems when using ide To develop the ROR application. It took me half a day to understand it. I checked some documents at night to get started. It seems that as a friend said, the network information related to ror is not very rich at present. Some friends who want to learn this framework may also have some difficulties in this regard, I would like to share with you some of my experience here. I am sorry for any improper experience. 

Ruby on Rails environment (based on Win XP)

The setup of an ROR environment is relatively simple, but there are several small points to note, which may save your mind. 1. Install Ruby first. The current version is 1.8.5.

  Download here , This is an EXE file. You can simply click Next. The default installation path is C:/Ruby. After the installation is complete, you can enter ruby-V under the command line to check whether the installation is complete. If "Ruby 1.8.5…" appears ......" 2. Install rails. This step is interesting. You can download it directly from the network through the command line (CMD. If you want to install rails in one step, you can use the gem install rails -- include-dependencies command, but it takes several minutes because it is running in the background. If you want to see which components are installed, you can directly use gem install rails, but this requires you to stay in front of the computer, because you need to enter a few y to complete; you can still use the rails-V command line to check whether the installation is successful, if "Rails 1.1.6" is displayed, it indicates OK; 3. do you know what to do? Download radrails. Like Eclipse, you can download and decompress the package directly without installation. Click 

Download here According to the network speed, it may take five or six minutes. I use the Dudu accelerator, which is relatively fast. 4. after decompressing radrails, click radrails "" to display the interface similar to eclipse. (install JDK or JRE above 1.4.2, because eclipse requires a Java environment );

  Radrails parameter configuration

5. The following is the article Article One of the most important aspects is what bothers me when I started using radrails, that is, how to configure it. Here I will also introduce it with more pen and ink. In fact, it mainly involves the configuration of parameters such as interpreter name, Ruby, rails, and rake. Interpreter first, In the radrails environment WINDOW> preferences> Ruby> installed interpreters, and then click the "add" button in the interpreter notebook file. For example, I am now "C: /Ruby/bin/ruby.exe "; the following is rails. In WINDOW> preferences> rails> Configuration, select the rails file under the directory in rails path. Note that it is not rails. CMD: if this file is selected, the operation is invalid. This may be a problem that many people are prone to. For rake, after you open the file selection box in the same place, select the rake binary file. bat is not a rake either. cmd. If the two files are selected, they are still invalid. If the file is not found for a long time, it means you have not If yes, you can use gem update rake to download it. 6. Well, let me save these settings and create a new file in radrails. For simplicity, click rails project in rails under File> New to create a project named demo, and set other settings as default. At this time, the server and related Basics Code Radrails has already been generated for you. There is a view named "servers" in the lower right. If there is no accident, a record named "demoserver" will appear in it, this indicates that a server already exists in the project demo, with the port number 3000 and the status stopped. Click the green button in the upper-right corner of the view to start the server, and then enter http: // localhost: 3000 in the URL box in your IE browser or a blue ball next to the green button.
7. I'm done. What happened? It's amazing ~~~ Welcome aboard.

The above is the simplest ror Application Based on radrails. We hope to bring you to the door of ROR and enjoy it. Good things are still coming soon :)

  Radrails comments: So far, this tool can be said to be the best IDE for ror development on the Windows platform, but for those who are familiar with eclipse development of Java or other applications, one thing you may not get used to is that the function is not automatically completed, which requires you to remember a lot of methods. Although it is said that it is not easy to implement this function in the Dynamic Language IDE, since it is an IDE that developers like, I think this function is still indispensable. However, now, radrails is only a 0.7 version, and there is still a lot of space to move forward. Let's wait!

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.