New screencast up on AWS

13Apr07

The AWS folks posted my screencast 7 Steps to Easy Rails Deployment to their articles and tutorials section.

About these ads


4 Responses to “New screencast up on AWS”

  1. 1 jfno

    Really cool, we were toying with the idea of using EC2 to scale on demand our applications. We won’t just toy with the idea anymore, we’ll use the plugin.

  2. 2 Kumar

    I’m trying the elastic rails plugin and ran into some issues.
    This is on windows box.
    First of I tested the amazon-ec2 gem using the gems\amazon-ec2-0.2.4\bin\ec2-gem-example.rb and was able to get it going fine. That vefied that I has valid keys etc.

    I followed the easydeploy steps and got stuck at $cap launch_instance
    err msg–
    ./config/../vendor/plugins/elasticrails/elastic_rails.rb:4:Warning: require_gem
    is obsolete. Use gem instead.
    * executing task launch_instance
    (eval):142:in `connect': uninitialized constant EC2::AWSAuthConnection (NameErro
    r)
    from (eval):59:in `keypair_exists?’

    Then I changed require_gem ‘amazon-ec2′ in elastic_rails.rb to require ‘amazon-ec2′
    C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `ge
    m_original_require': no such file to load — amazon-ec2 (LoadError)
    from C:/InstantRails/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require
    .rb:27:in `require’
    from ./config/../vendor/plugins/elasticrails/elastic_rails.rb:4

    I cannot understand why its not able to see amazon-ec2 gem.
    I ran gem query –local and it does list amazon-ec2 like so –
    amazon-ec2 (0.2.4)

    Any help would be greatly appreciated as I’ve already exhausted by troubleshooting capabilities to figure this out

  3. 3 Kumar

    ok sample for 0.2.4 indicates that inclusion is done as require ‘ec2′. This works with irb.
    I changed elastic_rails.rb but still get
    (eval):142:in `connect': uninitialized constant EC2::AWSAuthConnection (NameError).

  4. Kumar, it looks like the ‘amazon-ec2′ gem has changed the method name to connect to AWS. In you rails app plugin directory, elastic_rails/lib/ the amazon.rb file has a connect method on line 141 that uses:

    “EC2::AWSAuthConnection”

    It appears AWSAuthConnection has been changed to “EC2::Base. Try changing that and see if that will do it. There may have been other updates as well so let me know what you encounter.

    Here is an example from the amazon-ec2 docs:

    # Require the amazon-ec2 gem and make its methods available in your Rails app
    # Put this at the bottom of your environment.rb
    require ‘EC2′

    app/controllers/my_controller.rb

    [some controller code ...]

    ec2 = EC2::Base.new(:access_key_id => “YOUR_AWS_ACCESS_KEY_ID”, :secret_access_key => “YOUR_AWS_SECRET_ACCESS_KEY”)


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

%d bloggers like this: