Welcome Guest | Login

Custom Gems

Hi,
I'm using the rflickr gem for a small application that displays a photo gallery using flickr's API. I have however added a few methods to the original code to keep it up to date with some changes in the API (the rflickr project doesn't seem to have been updated in some time). Now  I don't know how I should go about reflecting these changes in the unpacked gem on my production environment.
Should I unpack the gem to the vendor directory and upload the changed code there ?

2007-10-02 10:12 AM

Enygmatic - a quick question, have you restarted your mongrel instances or killed the dispatch.fcgi processes after modifying your code ?

To kill your dspatch.fcgi processes you can use the command below.
pkill -9 dispatch.fcgi

2007-10-02 10:50 AM

haven't killed the dispatch.fcgi processes ...will try that

2007-10-02 10:51 AM

no luck...still getting the error...

2007-10-02 11:15 AM

What error are you getting, exactly ?

2007-10-02 12:53 PM

i have added a method to the rflickr code as well as updated the code to match the latest API specification. Unfortunately, for some reason it is not picking the changed code from the vendor directory.

the error can be seen here http://photos.enygmatic.com/sets/

primaryPhotoURL is my addition

2007-10-02 01:00 PM

rflickr gem is a nightmare.  There is another gem called flickr, too - so you need to make sure you are using (and intend to use) the correct one for your app.

Do you have it in vendor/ or vendor/plugins ? I would suggest the latter.  Are you requiring it at all? If so, where?  How?  Try letting rails pick it up from your plugins dir.

I've had two very long bouts with this with some success - the guy I was helping was using the rflickr gem, which needed some hacking on the server to make it work.  If you're not on his same server then we may have to go through this again - but hopefully not.

2007-10-02 01:03 PM

didn't find the flickr gem as good as the rflickr one...tried both actually before settling on rflickr. Basically all i have done is made some changes in the base.rb class in rflickr.
changes are to correct one severe bug that used to cause an application crash, code changes to generate correct URLS as per flickr's changed API and addition of one method called primaryPhotoURL which i needed. I had mailed these changes to the guys maintaining the project over at rubyforge, haven't really recvd any reply from them as yet ( this was almost 3 months ago ).

right now I have it in vendor/
will try and first not require yet in the few cases that i have
also will then try and place it in vendor/plugins

2007-10-02 01:16 PM

moving it to vendor / plugins fixed it

2007-10-02 01:36 PM

how do you install flicker gem??????????

2007-12-02 04:39 PM

I created a rails project folder called '~/flickr' and want to install the flickr-1.0.0 gem inside its vendor folder using this advicehttp://www.hostingrails.com/forums/wiki_thread/2

timwest@wycliffe [~]$ gem install flickr -i ~/.gems
Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed flickr-1.0.0
timwest@wycliffe [~]$ export GEM_HOME=$HOME/.gems
timwest@wycliffe [~]$ export GEM_PATH=/usr/local/lib/ruby/gems/1.8:$GEM_HOME
timwest@wycliffe [~]$ cd flickr
timwest@wycliffe [~/flickr]$ cd vendor
timwest@wycliffe [~/flickr/vendor]$ gem unpack flickr
ERROR:  Gem 'flickr' not installed.
timwest@wycliffe [~/flickr/vendor]$ gem unpack flickr-1.0.0
ERROR:  Gem 'flickr-1.0.0' not installed.

2007-12-02 05:03 PM

Hi - We already have flickr gem on the server. Please verify. Thank you

2007-12-02 05:28 PM

HostingRails Support
is it the flickr-1.0.0 gem or is it the rflickr gem.  I need the flickr-1.0.0 gem.
what is the command to include it in my project
what file do I edit

2007-12-02 06:57 PM

You may have to edit your environment.rb and add " require 'flickr' ". You may also have to obtain flickr API key and add the required lines in environment.rb

2007-12-02 09:22 PM

Regards,
Rahul
How would I install the attachement_fu Plug-in with my shared hosting plan

Installing the attachment_fu Plug-in
To install the attachment_fu plug-in, enter the following command:
$ ruby script/plugin install \
http://svn.techno-weenie.net/projects/plugins/attachment_fu/

2007-12-06 10:11 PM

I did what I was told to do inhttp://www.hostingrails.com/forums/rails_coding_thread/354 and go this error

[~/#]$ ./script/plugin install attachment_fu
-jailshell: ./script/plugin: Permission denied

also i typed in

ruby script/plugin install \http://svn.techno-weenie.net/projects/plugins/attachment_fu/

and got this error

[~/#]$ ruby script/plugin install \
> http://svn.techno-weenie.net/projects/plugins/attachment_fu/
already installed: attachment_fu http://svn.techno-weenie.net/projects/plugins/attachment_fu/).  pass --force to reinstall

is there a command to list plugins
am I to do a include statement in environment.rb,  what does it look like

2007-12-06 10:26 PM

I went to my ~/#/vendor/plugin/ and found

~/#/vendor/plugin/attachment_fu

which is an empty directory
there are no files in it

it should have

+ ./attachment_fu/README
+ ./attachment_fu/Rakefile
+ ./attachment_fu/amazon_s3.yml.tpl
+ ./attachment_fu/init.rb
+ ./attachment_fu/install.rb
...
+ ./attachment_fu/test/test_helper.rb
+ ./attachment_fu/test/validation_test.rb
attachment-fu
=====================

2007-12-06 10:34 PM

The permission denied error was because the plugin script didn't have execute permission. I've corrected it now and reinstalled the attachment_fu plugin.

2007-12-06 10:48 PM

I like the typo gem and the great installation notes
http://www.hostingrails.com/forums/wiki_thread/3

how can I have users log on because everyone is writing comments to the blogs

2007-12-09 06:55 PM

You should check with the Typo community on that one.  I'm not too familiar with the latest version of Typo and what it can do to prevent spam.  

2007-12-10 01:46 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!