Posts tagged as:

gems

I got an email from someone who enjoys Teach Me To Code. He was having a problem getting gems. Anytime he tried to install a new gem, he was getting this response:

ERROR:  While executing gem ... (Gem::RemoteSourceException)
    HTTP Response 302 fetching http://gems.rubyforge.org/yaml

I told him to try running ‘gem update –system’ which will update RubyGems itself. He did and got the same error.

He told me then that he was running RubyGems 1.0.1. Aha! That’s the problem. If you’re running into this problem, here’s what you do:

  1. Go to http://rubygems.org
  2. Download the RubyGems .zip or .tar.gz file
  3. Unzip or untar the file you just downloaded
  4. Change directories to the directory created by unzipping or untarring
  5. Run ‘ruby setup.rb’

It will build RubyGems from scratch and replace your ‘gem’ executable. Then ‘gem’ will connect to http://rubygems.org and pull the gem libraries in properly.

{ 33 comments }

Loading multiple Ruby Gems can result in runtime errors when an incompatible version of a gem dependency is already loaded as a dependency of another gem.

Gem bundler can also pre-load and cache gems for faster loading.

Having two gems that require different versions of the same dependency can sometimes cause runtime errors. Yehuda Katz and Carl Lerche have created an elegant solution in the Gem Bundler.
Download 108.8 MB
Download (iphone & ipod) 48.8 MB

{ 0 comments }

I just read the article by Pratik Naik from the Rails Core Team regarding Rails Templates.

Have you ever wished you could start out your Rails application with all of your gems installed and all of your standard setup items completed? Well, wait no longer. You can now do it with Rails Templates. Pratik covered it pretty well, so I’m not going to repeat what he’s done. Rather, I’m going to share a template of my own and explain why I included what I did.

[click to continue…]

{ 1 comment }


Learn how to save data such as bank information, social security number, or other sensitive information in your Rails application securely by encrypting the data. By using spikex’s gem Strongbox, you can use private and public keys to secure your data in your database to where you must have the password to decrypt them.
Download 107.9 MB
Download (iphone & ipod) 34.6 MB

{ 0 comments }


In this screencast, I show you how to use the Twitter gem to connect to Twitter, and we clarify some of the difficulties that comes with learning OAuth.
Download 67 MB
Download (iphone & ipod) 23.6 MB

{ 20 comments }


In this series, I attempt to recreate a twitter style application called ‘Flitter’. In this installment, I show you how to create an authenticated system easily using existing tools. I also show how to generate test data to simulate an active application. Finally, you will learn how to set up self-referencial associations.
Download 280 MB
Download (iphone & ipod) 86 MB

{ 19 comments }

While looking at articles and resources about authentication in Ruby on Rails I ran across a set of generators written by Ryan Bates of Railscasts. You can find the nifty generators at http://github.com/ryanb/nifty-generators/tree/master

I ran the generators and have posted the resulting code at http://github.com/charlesmaxwood/nifty/tree/master.

[click to continue…]

{ 5 comments }

RMagick is the Ruby wrapper for ImageMagick—the open source API for image manipulation. RMagick is used for graphing with the Gruff gem and many other things in Ruby and Ruby on Rails.

Installing RMagick on Mac OS X is pretty simple, but not as simple as typing gem install rmagick but pretty close.

[click to continue…]

{ 1 comment }