Displaying 20 results from an estimated 9000 matches similar to: "Paperclip with external url and asset_host?"
2009 Oct 01
0
Paperclip + asset_host uploading to external URL
I would need to be able to upload images to an external URL
I know S3 is an option but there are better image hosts out there for my
requirements and one in particular I would like to make use of.
I''m thinking that I could use asset_host to determine the url and path
but I can''t seem to make Paperclip play nicely.
The image host I want to use is www.unlimitedwebhosting.co.uk
I
2008 Mar 20
2
Anyone having problems with asset_host not getting set up right?
Hey All,
I think I found a bug but I would be suprised since it would cause major
problems.
We setup the asset_host in init.rb with:
if File.exist?(facebook_config)
FACEBOOKER = YAML.load_file(facebook_config)[RAILS_ENV]
ENV[''FACEBOOK_API_KEY''] = FACEBOOKER[''api_key'']
ENV[''FACEBOOK_SECRET_KEY''] =
2011 Jan 08
1
Paperclip custom Interpolation in url
Folks,
I have a simple model hierarchy (reduced to example as below)
class Post < ActiveRecord::Base
has_many :comments
end
class Comment < ActiveRecord::Base
belongs_to :post
has_attached_file :photo,
# :url => "/assets/class_cal/<original post
date>/:id/:style/:basename.:extension"
:url =>
2011 Sep 02
1
can't compile assets on prod due to asset_host config && SSL requirement
My production asset_host config looks like this:
config.action_controller.asset_host = Proc.new { |source, request|
if request.ssl?
"#{request.protocol}#{request.host_with_port}"
else
"#{request.protocol}assets#{(source.length % 4) +
1}.example.com"
end
}
...which is more or less straight from the docs:
2008 Jun 13
1
asset_host and ssl pages problem
I am configuring assets hosts for our site but am running into problems
when navigating to an https page. Basically the server is trying to pull
the assests out on https:// rather than http:/ but i do not have https
configured on the assets server. I have dug around a bit and found this
bit of code which should when a page is https:// serve the assests from
the app server and when it is not https
2011 Feb 15
0
Question on Paperclip paths/urls
Note that if I use the default Paperclip :path (i.e. not setting this
attribute and files going to public/system), everything is fine. This
question is to do with setting an alternative path.
I have a model using paperclip for a file with a custom path:
has_attached_file :tu_raw_bill_csv,
:path =>
2010 Aug 05
5
asset_host and ActionMailer
After digging through the rails code to figure out why my asset_host
wasn''t getting applied to emails, I realized that it''s because the
config object in the context of a mailer is config.action_mailer and
not config.action_controller. This means you need to set asset host
separately for emails, as config.action_mailer.asset_host.
Should this be considered a bug? Is it really
2006 Aug 15
0
Using config.action_controller.asset_host with ActionController::AbstractRequest.relative_url_root
I''m looking for some help with an issue I''m having using an external
asset host. I''ve got the lines below in my environments/development.rb
file.
# Enable serving of images, stylesheets, and javascripts from an asset server
config.action_controller.asset_host = "http://assets.example.com"
#make rails think it lives in /app
2007 Dec 16
0
Specifying asset hosts via a proc (ActionController::Base.asset_host)
Hi all,
I just submitted a patch that would allow you to pass a proc to
ActionController::Base.asset_host rather than just using a %d
wildcard (e.g. assets%d.example.com). Basically this frees you from
the hard-coded assumption that you have 4 hosts numbered 0-3 and also
allows you to do smarter things depending on the asset (e.g. images
from a particular domain, stylesheets from another). The
2010 Feb 15
4
Changing the :path and :url options of has_attached_file in paperclip
Hello,
I am using the paperclip plugin to upload images and it works
absolutely fine.
I intend to save my uploaded images to C:\Application_name\public
folder. Accordingly, with some study over the i-net, I changed
the :path option of has_attached_file to -
:path => "C:/Application_name/
public/:class/:attachment/:id/:style_:basename.:extension"
Now, the files are being saved to
2011 Aug 13
1
Paperclip - could not find generator.
Hello there,
I installed plugin "paperclip" for working with images, but after
running a command
--
rails generate paperclip user avatar
I am getting error
--
Could not find generator paperclip.
If I will try run a command
--
bundle show paperclip
So I will get
--
/Library/Ruby/Gems/1.8/gems/paperclip-2.3.0
In Gemfile I have
--
gem "paperclip", "~> 2.3"
I
2008 Jun 28
5
asset_host?
Hi there,
I''m wrapping my head around Facebooker to try and build some integration points between an existing ROR application and facebook. I''ve managed to get FB talking to my app but when I tried to access my ROR app directly I noticed that all requests for images, CSS, and JS files were being made through my callback_url. Commenting out the following line from
2009 Aug 17
0
Paperclip: processor proc not firing
Hi
It''s extremely rare that I have to post something on the Rails list,
but this is one of those times that I''ve been completely stuck for
countless hours.
Environment: Rails 2.3.3
I''ve implemented a custom processor proc for video thumbnailing with
Paperclip (latest trunk version as git submodule, and yes, it''s
updated) using the instructions posted
2010 Aug 22
0
Paperclip - possible to modify file and load file content as string?
Wanted to see if anyone knows of a way - or the preferred way - to do these
three tasks with Paperclip:
1) Access the content of an uploaded file before save. I did find that the
following works before save, but is there a clearer way to do this:
self.uploaded_file.queued_for_write[:original].open.read
2) Access the content of a file after save while my AR model instance is
still alive and/or
2012 Jan 25
0
Paperclip preserve files ?
Hi,
I am using paperclip to upload files. The problem I am facing is,
based on my object property I need to preserve my file. Means my object
should be deleted from db but the file need to be restored.
I am using the option :preserve_files => true.
If I keep the above option in model it will be access to all the
objects of the model. I need to restore only for limited objects.
2011 Mar 08
0
keep getting an error, "rescue in load_missing_constant': uninitialized constant Paperclip::Glue (NameError)"
hi, there
rails: 2.3.8
machine os: Ubuntu 10.04 Lucid
I''m having some problems with my rails installation in one of my new
development machines.
I have installed all the gems in my config/environment.rb file.
When I now run either script/console or script/server, I have the
error of " `rescue in load_missing_constant'': uninitialized constant
Paperclip::Glue
2010 May 13
0
Rails 3, Paperclip and checking out particular revisions
Hey, got a weird one. I''ve been playing with a couple of Rails 3 apps
and today I have broken both. Seemingly by updating my paperclip gem.
Gemfile
.....
gem ''paperclip'', :git => ''git://github.com/thoughtbot/paperclip.git'',
:branch => ''rails3''
It appears the latest version of paperclip or at least in the branch
has broken in
2008 Sep 17
1
Stubbing Paperclip calls to Amazon S3 (for Rspec)
Would anyone happen to know how to stub a call to S3 from Paperclip?
I''ve searched every where and no one seems to have posted anything about
this. I''ve done very little in the way of spec''ing dependencies on
external services, so any ideas on how to do this with Paperclip & S3
would be most appreciated. I''m happy with stubbing out Thinking Sphinx -
would
2013 Sep 04
2
Speed up image processing of Paperclip in Acceptance Tests
Hi All,
I have a question here: How to Speed up image processing of Paperclip in
Acceptance Tests
When running capybara feature specs I can see lots of Slow factory notices
which are populated byfactory_girl. These Slow factory things heavy slow
down the feature specs, I think, even feature specs are intrinsic slow
specs. Then I had some inspect and found out most of the Slow factory was
2010 Sep 01
0
PaperClip StorageMethodNotFound (Cannot found filesystem)
Hello ,
i have an issue with paperclip . when i a working on
windows its works fine when i Go on Fedora Or heroku It gives Error
PaperClip StorageMethodNotFound (Cannot found filesystem) :
.....................
.....................
.....................
.....................
is this works for me