App can't find gem

Hi all,

I’m new to rails, and initially I’m just trying to get a simple app to
work. I’ve read the basics and got rails up and running, but I can’t get
my app to find the required gem.

I’m attempting to use this gem: GitHub - mislav/instagram: The first Instagram website and lightweight API HTTP client, and
I’ve installed the gem (it appears when using list --local) but when
running the Example code in the docs, I get this error still:

No such file to load – instagram

I created a new model called photo.rb and copied the Example code into
that, not sure if that’s correct or not though.

I know this probably isn’t enough info to provide help so I can provide
more detail as needed

Thanks in advance

On Thu, Feb 24, 2011 at 6:32 PM, Paul W. [email protected] wrote:

No such file to load – instagram

have you required the library in photo.rb?


You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

Jim ruther Nill wrote in post #983579:

On Thu, Feb 24, 2011 at 6:32 PM, Paul W. [email protected] wrote:

No such file to load – instagram

have you required the library in photo.rb?

Hi Jim, thanks for the reply. Yep it’s included in photo.rb as below:

require ‘instagram’

Paul

I’ve installed the gem (it appears when using list --local)

When you installed the gem, did you install it with a sudo command or
did
you just run gem install instagram? The reason I’m asking it that it
sounds
like the gem is installed but not to a path that is being searched by
ruby
for gems. The gem may be installed in a local home folder location
instead
of where ruby is installed.

B.

Thanks Bryan, I’ll give that a try - hadn’t thought of it

Paul

Which Rails you use? If you use Rails 3 with Bundler, you want to put

gem “instagram”

in your Gemfile. And run ‘bundle install’