AptanaWithInstantRails
Setting up your development system
These directions are for a windows system.- Download InstantRails 2.0.
- Create a directory "C:\InstantRails"
- Move the InstantRails zip file into that directory.
- Unzip it.
- Move to phpmyadmin folder to inside the www folder.
- You will do your development using Aptana, a Java application based on eclipse. You will need JRE 1.5.0 or later installed.
- Download Aptana Community Edition for windows, full installer.
- Install Aptana
- Run Aptana: select C:\InstantRails\rails_apps for Workspace. (This step is important! Don't put your workspace anywhere else.)
- Aptana may automatically find an update. If so, install it.
- Install the RadRails Plugin:
- Help/Software Updates/Find and Install
- Search for new features
- Select RadRails and Subclipse
- On the next page ("Search Results"):
- Click Next; accept license
- You may see a warning for unsigned features. Click "Install All".
- Click the button to restart Aptana.
- 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:
- Rails Path: C:\InstantRails\ruby\bin\rails
- Rake Path: C:\InstantRails\ruby\bin\rake
- Mongrel Rails Path: C:\InstantRails\ruby\bin\mongrel_rails
Quick demo application
We will create a simple application called "myapp" to make sure everything is working. This should only take a few minutes.- Run C:\InstantRails\InstantRails.exe
- 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 - In Aptana, you may need to open a few fiews. Under "Window/Show View" open the Generators, Rake Tasks, Ruby Explorer, and Servers views.
- Create a new rails project called "myapp"
File/New/Rails Project Project Name: myapp Finish
- Open the file config/database.yml. Change the development section to:
development: adapter: mysql database: myapp_development username: root password:
- 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"
- Use "rake" to create the database tables.
- Select the rake tasks tab at the bottom.
- Select the db:migrate option
- Click Go
- 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.
- 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.
History Key
- New Content
- Removed content