AptanaWithInstantRails

Version 3, last updated by strobetal at over 17 years

Setting up your development system

These directions are for a windows system.
  1. Download InstantRails 2.0.
  2. Create a directory "C:\InstantRails"
  3. Move the InstantRails zip file into that directory.
  4. Unzip it.
  5. Move to phpmyadmin folder to inside the www folder.
  6. You will do your development using Aptana, a Java application based on eclipse. You will need JRE 1.5.0 or later installed.
  7. Download Aptana Community Edition for windows, full installer.
  8. Install Aptana
  9. Run Aptana: select C:\InstantRails\rails_apps for Workspace. (This step is important! Don't put your workspace anywhere else.)
  10. Aptana may automatically find an update. If so, install it.
  11. Install the RadRails Plugin:
    • Help/Software Updates/Find and Install
    • Search for new features
    • Select RadRails and Subclipse
    • On the next page ("Search Results"):
      • check "Subclipse" box
      • expand Radrails box
      • check the second box "Aptana RadRails"
      • do not check the box "Aptana RadRails Integration"
    • Click Next; accept license
    • You may see a warning for unsigned features. Click "Install All".
  12. Click the button to restart Aptana.
  13. You may need to set the ruby and rails configuration in Aptana, particularly if you already had a ruby interpreter installed.
    • Open Window/Preferences
    • Select Ruby/Installed interpreters
    • Add C:\InstantRails\ruby
    • Delete any other ruby interpreters (from Aptana, not from your computer!)
    • Make sure the box is checked for the interpreter you just added.
    • Now go to Rails/Configuration and set these:

Quick demo application

We will create a simple application called "myapp" to make sure everything is working. This should only take a few minutes.
  1. Run C:\InstantRails\InstantRails.exe
  2. Create a mysql database called "myapp_development".
    Browse to localhost/phpmyadmin
    click databases
    Under "Create a New Database" enter "myapp_development" and create.
    Alternate: Open up InstantRails
    Click "I" symbol
    Select "Configure" then "Database" (This will open up phpMyAdmin)
    Create a New Database by entering "myapp_development" and create
  3. In Aptana, you may need to open a few fiews. Under "Window/Show View" open the Generators, Rake Tasks, Ruby Explorer, and Servers views.
  4. Create a new rails project called "myapp"
    File/New/Rails Project
    Project Name: myapp
    Finish
  5. Open the file config/database.yml. Change the development section to:
    development:
     adapter: mysql
     database: myapp_development
     username: root
     password: 
  6. Generate a scaffold. Use "product name:string"
    • Select the Generators tab at the bottom.
    • In the option list, select Scaffold.
    • Type "product name:string" in the large text box
    • If nothing appears in the option list, try clicking the refresh button on the right.
    • click "Go"
  7. Use "rake" to create the database tables.
    • Select the rake tasks tab at the bottom.
    • Select the db:migrate option
    • Click Go
  8. Start the server for myapp.
    • Select the servers tab at the bottom.
    • Select the myapp server
    • Click the green start button at the right
    • Note the port number. It is probably port 3000, but whatever it is, you'll need to know it in the next step.
  9. Browse to localhost:3000/products. (Use a different port number if necessary.) You should see the scaffold product listing screen.

Recent Versions

Choose two versions to compare, or click the link to view it.

Clear All

History Key

  • New Content
  • Removed content