Archive for September, 2008

Installing amazon-ecs/hpricot RubyGem on Windows Operating System

1

Installing rubygems that come with native extensions is not same on gnu/linux and Windows platforms as I have discovered recently. Apparently, it is important that the native extensions needed by the rubygem be built with the same compiler tool chain as your main ruby installation. The rubygem I needed to install was amazon-ecs and it depends on another rubygem called hpricot which comes with native extensions. Though hpricot installed fine on gnu/linux OS, I recieved the following errors on Windows:

C:\Users\tabrez> gem install hpricot
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while…
ERROR: Error installing hpricot:
ERROR: Failed to build gem native extension.

c:/ruby/bin/ruby.exe extconf.rb install hpricot
checking for stdio.h… no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161 for inspection.
Results logged to c:/ruby/lib/ruby/gems/1.8/gems/hpricot-0.6.161/ext/fast_xs/gem_make.out
C:\Users\tabrez>

Help on the IRC channel and some searching on the Internet provided me with the following solution: use whytheluckystiff’s repository as the source to install hpricot rubygem. Once hpricot rubygem was installed, amazon-ecs rubygem installed with no problems.

C:\Users\tabrez> gem install hpricot ––source http://code.whytheluckystiff.net
Successfully installed hpricot-0.6-x86-mswin32
1 gem installed
Installing ri documentation for hpricot-0.6-x86-mswin32…
Installing RDoc documentation for hpricot-0.6-x86-mswin32…

C:\Users\tabrez> gem install amazon-ecs
Successfully installed amazon-ecs-0.5.3
1 gem installed
Installing ri documentation for amazon-ecs-0.5.3…
Installing RDoc documentation for amazon-ecs-0.5.3…
C:\Users\tabrez>

The same source works for sandbox rubygem too.

References:

“Hello, World” Web Application in Ruby on Rails using Aptana Studio

2

I am assuming that you have everything properly setup on your computer for developing applications with the Ruby on Rails framework using Aptana Studio IDE. If not, see my previous posts:

In this post I will take you through a screenshot guided tour of the Aptana Studio (RadRails) IDE and show you how to develop a blank web application using Ruby on Rails framework and add a simple scaffold to it(“Hello, World” equivalent for Rails framework). So let’s get started.

When you run the Aptana Studio application, you will see the splash screen as shown below:
Aptana Studio IDE splash screen.

To create a new Ruby on Rails project, go to File -> New -> Project… and select Rails Project from the “Rails” folder(expand it if necessary). Enter a name for the project(say “Demo1″) and click Finish.
Create a new Ruby on Rails web application project in Aptana Studio IDE

The main window should look like the following screenshot(click to see larger version).
Create a new Ruby on Rails web application project in Aptana Studio IDE

Below you can see the screenshots of various sections of the main window shown above:
Create a new Ruby on Rails web application project in Aptana Studio IDE

The Project pane on the left:
Create a new Ruby on Rails web application project in Aptana Studio IDE

The Console window at the bottom:
Create a new Ruby on Rails web application project in Aptana Studio IDE

The Scripts window at the right(you can access the same from the “Scripts” menu too):
Create a new Ruby on Rails web application project in Aptana Studio IDE

The Cheat Sheets window at the extreme right:
Ruby on Rails cheatsheet in Aptana Studio IDE

If you click the “Click to Begin” link in the cheatsheet window(shown above), you will see the following “Dynamuc Help” window with links to various Rails help topics:
Ruby on Rails help topics in Aptana Studio IDE

Aptana Studio supports the following views that you can enable, for example to view API documentation, try out some regular expressions etc.:
Different views supported for Ruby on Rails web application project in Aptana Studio IDE

At the bottom, you can click on RubyGems tab to see a list of Ruby gems:
List of RubyGems available in Aptana Studio IDE

You might be prompted to install some Ruby gems by Aptana Studio(you can install or ignore them):
Install RubyGems right from the Aptana Studio IDE

RailsPlugins tab will show you the Rails plugins that you can install with a few simple mouse clicks:
Aptana Studio shows the Rails plugins that you can install with a few  mouse clicks

RakeTasks tab allows you to perform various rake tasks by selecting the one you want from the drop-down box:
Perform various rake tasks just by selecting the one you want from the drop-down box in Aptana Studio IDE

Generators tab similarly allows you to generate a scaffold, model, controller, view etc. by selecting the appropriate option from the drop-down box:
Generate a scaffold, model, controller, view etc. by selecting the appropriate option from the drop-down box in Aptana Studio IDE

Creating a Blank Rails Web Application using Aptana Studio

Let us put the Generators tab to use. Select “Scaffold” from the “Generator” dropdown box, enter the parameters as shown in the screenshot below and press the “Go” button.
Generate a Rails scaffold and model in Aptana Studio IDE

You should see the following output in the Console tab.
Scaffold generation output in Aptana Studio console window

You should be able to see the following migration file generated in the project directory:
Migration file generation output in Aptana Studio in console window

And here is a screenshot showing the contents of the generated migration file:
Generated Rails migration file by the scaffold generator in Aptana Studio IDE

If you now run the rake tasks “db:create:all” and “db:migrate” you should be able to see the output of commands executed in the console window:
Output of Rake database migration tasks in Aptana Studio console window

Now run the application. You should see the following output in the internal web browser of Aptana Studio:
Ruby on Rails web application running in the internal web browser of Aptana Studio IDE

Click on the “New Book” link and you will see the new book form like this:
Ruby on Rails web application running in the internal web browser of Aptana Studio IDE

You can go back to your Rails project, make edits, generate more scaffolds, models, controllers and views and test your changes in the internal browser of Aptana Studio. And so on and so forth.

Aptana Studio IDE with RadRails plugins provides one of the richest web application development environments for Ruby on Rails framework. NetBeans 6.1, emacs/vim, IntelliJ IDEA are pretty good too and all of these are multi-platform, so why bother with Mac-only solution like Textmate? ;)

Setting Up Rails Development Environment using Aptana Studio

5

You first need to complete the first five steps of my earlier post “Setting Up Rails Development Environment on Windows Vista/XP” which explain how to install Ruby, RubyGems, Ruby on Rails, Mongrel web server and MySQL database server on Microsoft Winodws Vista/XP. You can skip the last two steps(sixth and seventh) of that post which describe how to setup NetBeans 6.1 IDE for development with the Rails framework; continue with this post instead which explains how to setup the Eclipse-based IDE Aptana Studio for developing web applications using the Ruby on Rails framework.

Download and Install Aptana Studio and RadRails plugin

  1. Download Aptana Studio IDE, run the installer and install it on your computer(or simply extract it if you downloaded the zip file).

    Download Eclipse-based IDE called Aptana Studio with RadRails for Ruby on Rails

  2. Run Aptana Studio. In the main window, you should see the start page of Aptana Studio(for some reason if you don’t, go to Help -> Aptana Studio Start Page…). Here you will see options to install various plugins for Aptana Studio like PHP plugin, Ruby on Rails plugin, Adobe AIR plugin etc. Click the “Install” button in the “Ruby on Rails” section.
  3. Select Aptana RadRails checkbox and select all the available optional features available for it.
    Install RadRails plugin for Eclipse-based Aptana Studio IDE.

    Install RadRails plugin for Eclipse-based Aptana Studio IDE.

    I recommend that you leave the selected default location for installation as it is and proceed with the installation.
    Install RadRails plugin for Eclipse-based Aptana Studio IDE.

Once the RadRails plugin is installed, it is time to configure Ruby installation in Aptana Studio. If you haven’t installed Ruby and Ruby on Rails yet, see my previous post.

Configure Ruby/Rails in Aptana Studio

  1. If Ruby is installed in a location like “C:\ruby”, Aptana will automatically find the path and configure the Rails environment so you don’t have to worry about anything. If you have installed Ruby in a non-standard path where Aptana could not find it, then you need to set the path manually. To do so, go to Windows -> Preferences, expand the Ruby node in the left pane and select the Installed Interpreters item.

    Set the path to installed Ruby interpreter in Aptana Studio RadRails IDE

  2. Click the Add button and enter the details about your Ruby installation directory. Paths to all the other Ruby tools(e.g. rake, rails etc.) will be picked up automatically from this setting.

    Set the path to installed Ruby interpreter in Aptana Studio RadRails IDE

That’s all we need to do to get Ruby on Rails framework configured with Aptana Studio IDE. We can now create new project and check out if everything is working properly. I have made a separate post to show how to create a basic Ruby on Rails web project in Aptana Studio and run it with the help of a lot of screenshots to introduce you to the most important features of the Aptana RadRails IDE for Rails based development, so check that out for more details.

buy prednisone medication COD purchase prednisone without prescription needed purchase prednisone prescription online prednisone no prior script prednisone no rx needed order prednisone usa cod buy prednisone without rx from us pharmacy buy prednisone online without rx purchase prednisone without prescription order prednisone saturday delivery buy prednisone amex online without prescription ordering prednisone over the counter buy prednisone amex online without rx where can i buy Prednisone ordering Paxil over the counter order Paxil without rx needed order Paxil pharmacy Paxil overnight delivery fed ex ordering Paxil without a script order Paxil order amex order Paxil amex online without prescription buy Paxil pay pal without prescription order rx free Paxil cheapest Paxil available online purchase Paxil without purchase Paxil without prescription how to order Paxil online without a prescription purchase Paxil cod next day delivery buy discount Paxil online buy Paxil no visa online without rx where to buy accutane buy frontpage software cheap mortgage application software buy autocad software best price for final draft 7 software iphone software download plagiarism software to buy for parents Crestor side effects buy masterwriter software discount bmi sesac microsoft software downloads wm5 software download treo software download cheap discount software xxasdf discount trellian software best antivirus software download cheap microsoft word software buy software for mac software discounts for educators microsoft office purchase Prednisone online no membership buy windows xp oem software buy flash cs3 software photoshop cs 5 full fashion conference italy buy Orlistat with amex ordering Lasix over the counter purchase online prescription Lasix without windows 7 product key purchase online cheapest xenical available online prescription xenical online online Maxalt achat Maxalt Valtrex with repronex where to buy Valtrex by cod where to purchase generic valtrex online without a prescription quality generic valtrex cheap valtrex usa (no prescriptions needed for Buspar|buy Buspar with no prescription|online pharmacies Buspar|Buspar cheap|buy Buspar without rx|purchase rx Buspar without|Buspar purchase online|purchase Buspar online without rx|purchase Buspar free consultation|buy Buspar Online|buy Buspar american express|buy Buspar Online|buy cheap Buspar with dr. prescription|Buspar side effects|fedex Buspar without priscription|overnight Buspar without a rx|order cheap overnight Buspar|Buspar toronto|uk order Buspar|Buspar no doctors prescription|Buspar mexico|Buspar order|no prescription Buspar with fedex|order generic Buspar|buy Buspar without rx from us pharmacy|prezzo Buspar|Buspar 10mg|Buspar from canada|purchasing Buspar without a script|buy Buspar australia|purchase Buspar visa without prescription|online purchase Buspar|buy Buspar no perscription cod|buy Buspar drugs|buy Buspar with visa|buy Buspar without rx needed|buy Buspar without prescription|buy Buspar no prescription low cost|purchase purchase Buspar no prescription cheap buy cheap Nolvadex cod buy Nolvadex infertility in internet visa at Wisconsin Ontario omicrosoft office 2003 megaupload online purchase Lasix Buy genuine accutane online buy nolvadex amex online where to buy synthroid in germany where to buy synthroid pills cheap discount Nolvadex overnight Accutane 20mg mexico order Lasix usa Lasix overnight delivery fed ex buy zithromax overnight purchase online prescription zithromax without buy Nolvadex cheap cheapest Nolvadex available online buy Nolvadex without rx from us pharmacy buy Nolvadex without a prescription overnight delivery buy 20mg Nolvadex free shipping buy Nolvadex no prescription order zithromax overnight delivery buy zithromax 100 mg visa Valtrex without doctor prescription buying zithromax over the counter order zithromax with no prescription order zithromax 250mg mastercard order zithromax 250 mg visa order zithromax 500mg amex buy mail order Orlistat buy Valtrex online now Orlistat tablets purchase cheap Maxalt onlinebuy generic Maxalt pills free fedex delivery Buspar buy cheap Finpecia under without rx purchase online finpecia without rx finpecia fedex no prescription buy line finpecia fedex Valtrex overnight without a rx Buspar u.p.s shipping cod order cheap overnight Buspar free fedex delivery prednisone prednisone no script fedex buy valtrex cheap without prescription generic Valtrex fedex Online overnight shipping Valtrex purchase Zithromax without purchase Zithromax no scams Arimidex delivered overnight order cheap overnight Arimidex purchase Cytotec over the counter fedex buy Cytotec online overnight adobe financial results microsoft office professional 2007 upgrade download microsoft office professional 2007 cheap Buspar by money order how to buy Valtrex without a prescription cheap valtrex uk buy Flomax in the uk purchase Proscar usa cod adobe lm service adobe after effects simple creativity latest adobe flash download buy Crestor amex measurement software Photoshop For Sale buy discount Tamsulosin line Autocad 2010 Review download adobe premiere complete removal of office 2003 adobe indesign cs2 photoshop lightroom 3 cheap where can i buy herbal Crestor where to buy Crestor buy Crestor online cod Buy Fincar online 5 mg mastercard cheapest price for microsoft office vio software discount coupon purchase Orlistat amex online without prescription buy maxalt online without a prescription adobe photoshop 6 cd key Cheap Software Buy Downloads For Photoshop flash catalyst sql ms office 2010 enterprise windows 7 upgrade oem Windows Server 2003 Standard Edition Downloads For Windows 7 Ultimate buy Valtrex no prescriptions application free download office microcoft2007 buy Crestor drugs Valtrex no prescription purchase Valtrex amex online without prescription Xenical Orlistat Flomax buy on line boilsoft viseo create new instrument logic studio 9 cheap purchase finpecia Flomax best buy buy cheap oem software formica countertop cyberlink power dvd 9 download buy Prednisone no prescriptions cheap indesign cs android acdsee buy Flomax australia generic Valtrex online lightroom license .txt download de driver para corel windvd buy microsoft office online cheap generic Valtrex online buy Flomax online no prescription buy pharmacy Flomax waterview cheap Valtrex by money order ifinance price price of valtrex buy valtrex doctor prescription buy generic Crestor order generic Tamsulosin imtoo dvd ripper serial look like buy Buspar without a rx cheap digital video buy Prednisone amex want to buy Buspar in malaysia Bupropion buy Bupropion buy no perscription Amitriptyline buy discount Zithromax cheapest Zithromax available online how to order Buspar online without a rx purchase prednisone cod next day delivery where can i purchase prednisone online prednisone online cash on delivery microsoft office 2010 3 user license cheap mac desktops no prescription Orlistat cod delivery Work Order Tracking System Acrobat 6.0 Professional Oem Version Windows 7 buy Valtrex where order Orlistat no rx cheap proffes Microsoft Windows Xp Purchase buy Valtrex legally Windows Xp Server buy cheap online pharmacy Buspar buy Prednisone online now generic Zithromax usa accutane 40 mg delivered overnight buy accutane 40 mg with no prescription media 8 oline cheap cs software Discount Microsoft WindowsLightroom 2 Windows 7Ms Office StandardPhotoshop Cs5 UpgradeComputer Monitors For SaleWindows Xp InstallSuite Microsoft OfficeAutocad Version 2007Adobe Acrobat 9.0 Standard DownloadIe8 Download For Windows 7Adobe Paint ShopMicrosoft Service Pack 2Free Download Adobe AcrobatStudent And Teacher EditionManage ImageAdobe Acrobat 7 Pro DownloadVista Home Premium To Windows 7 UltimateWindows 7 Home Premium Upgrade OemAdobe Creative Suite 5 Master Collection Student And Teacher EditionBuy Adobe Photoshop Lightroom 3Ms Office 2010 Home And StudentCompare Photo SoftwareMicrosoft Office Word Viewer 2010Windows 7 Upgrade Student Discount ProfessionalWindows 7 Updates DownloadCreative Suite WebAdobe Reader VistaMicrosoft Windows 7 Home Premium Upgrade 64 BitPhotoshop 2Ie8 Download For Windows 7Photoshop 2009Suite Microsoft OfficeMicrosoft Office 2007 VersionUpgrade Windows Vista To 7Autocad Lt 2010Autocad 2010 Best PriceDownload Acrobat Reader 8 buy Flomax online us pharmacy cheapest Buspar available online where can i purchase Buspar without a prescription sony oem software Valtrex from india Prednisone prescription order Buspar shipped by cash on delivery buy Valtrex with no prescription prezzo Valtrex buy Valtrex shipped cod Proscar no prescription overnight Proscar overnight no consult where to purchase cheap Cytotec no rx Cytotec to buy is it legal to buy Cytotec online in australia buy Cytotec cheapest buy finpecia without prescription finpecia buy cod want to buy finpecia in malaysia buy finpecia with mastercard Buy Finpecia 1 mg online microsoft onenote and educator discount window mirror film charset windows 1252 reinstal windows finpecia overdose excel new window windows for loop microsoft office 2008 for mac home student cheap collection software virtual dj software web design software mac cheap or discount photoshop software load windows xp buy Orlistat legally Rosuvastatin generic order buspar pharmacy buy Flomax in mo dreamweaver cs4 windows mobile opera adobe photoshop price epson creativity suite
Go to Top