Installing plugin problem

6 views
Skip to first unread message

chris

unread,
Mar 25, 2008, 12:26:48 AM3/25/08
to Paperclip Plugin
Should this plugin install using the normal plugin installation method
ie script/plugin install "the_url"? It wouldn't for me.

If not I also tried to just download it to a gems folder within the
vendor dir and added the following to the environment.rb file:
config.load_paths << "#{RAILS_ROOT}/vendor/gems/paperclip"

Unfortunately that doesn't work either as I get an error message
telling saying:

undefined method `has_attached_file'

Jonathan Yurek

unread,
Mar 25, 2008, 9:11:19 AM3/25/08
to papercli...@googlegroups.com
chris,

Apparently the plugin script really doesn't like that our SVN server
uses HTTPS. The recommended ways of installing paperclip are to do one
of the following:

cd /RAILS_ROOT/vendor/plugins
svn export https://svn.thoughtbot.com/plugins/paperclip/tags/rel_X-x-x
paperclip
(where X-x-x is the version number you want)

or

cd /RAILS_ROOT/vendor/plugins
piston init https://svn.thoughtbot.com/plugins/paperclip/trunk paperclip

If you download it yourself you really should put it in the plugins
directory, as that's where Rails expects it to go. The plugin loader
does more than just add the load paths. It also requires the init.rb
of each plugin (and probably other things that I'm forgetting at the
moment), so it's best to let that handle it automatically.

Let me know if that helped your problem.

--
Jonathan Yurek
thoughtbot, inc.
jyu...@thoughtbot.com
617 482 1300 x114

chris

unread,
Mar 25, 2008, 9:57:14 AM3/25/08
to Paperclip Plugin
Hey Jonathan,

That did it. Good job on the plugin.

Should all file validations just be done with the models validate
method (except for the size as I see in the docs there is a validator
for it) ?

On Mar 25, 7:11 am, Jonathan Yurek <jyu...@thoughtbot.com> wrote:
> chris,
>
> Apparently the plugin script really doesn't like that our SVN server  
> uses HTTPS. The recommended ways of installing paperclip are to do one  
> of the following:
>
> cd /RAILS_ROOT/vendor/plugins
> svn exporthttps://svn.thoughtbot.com/plugins/paperclip/tags/rel_X-x-x 
Reply all
Reply to author
Forward
0 new messages