Re: [Radiant] Configuring asset path for Paperclipped
For the record; that solved the issue of setting the configuration value, thanks for the solution of putting another config.after_initialize block in the production.rb file. Also, in case it is helpful: We¹re using TinyPaper for a WYSIWIG editor and I found in necessary to make a symbolic link to the NFS directory from each RAILS_ROOT/public/ directory so that the images were found. All is working. :-) - Peter > From: Sean Cribbs > Reply-To: Radiant Mailing List > Date: Wed, 24 Feb 2010 09:46:43 -0700 > To: Radiant Mailing List > Subject: Re: [Radiant] Configuring asset path for Paperclipped > > Peter, Try placing that configuration in an after_initialize block (whether > in environment.rb or production.rb), like so: config.after_initialize do > Radiant::Config['assets.path'] = '...' # put in your own path here end Sean ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] Configuring asset path for Paperclipped
Thanks, Sean. I¹ll give that a shot. > From: Sean Cribbs > Reply-To: Radiant Mailing List > Date: Wed, 24 Feb 2010 09:46:43 -0700 > To: Radiant Mailing List > Subject: Re: [Radiant] Configuring asset path for Paperclipped > > Peter, Try placing that configuration in an after_initialize block (whether > in environment.rb or production.rb), like so: config.after_initialize do > Radiant::Config['assets.path'] = '...' # put in your own path > here end Sean ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] Configuring asset path for Paperclipped
Peter, Try placing that configuration in an after_initialize block (whether in environment.rb or production.rb), like so: config.after_initialize do Radiant::Config['assets.path'] = '...' # put in your own path here end Sean On 2/24/10 9:38 AM, Peter Degen-Portnoy wrote: > Hi Folks, > > We are just about ready to launch and our experience with Radiant, the > extensions and the community has been great. > > I¹m hoping that I could get some help in understanding how to manage the > configuration of the asset path for the Paperclipped extension version > 0.8.0. > > We have two production servers with a common NFS mounted directory so that > regardless of which server handles the image upload, both servers will see > the same image. > > Is it correct to use the Radiant:: Config[³assets.path²] to configure this > value? If so, it is then correct to place this setting in the > vendor/radiant/config/environments/production.rb file? I¹ve tried different > configurations, such as using the config/environments/production.rb file, > but that causes an ActiveRecord error (no surprises there). > > To verify the correct setting of the configuration value, I did the > following on my dev system: > > :script/console production > Loading production environment (Rails 2.3.4) > >>> require 'environment' >>> > => true > >>> Radiant::Config["assets.path"] >>> > => > "/var/www/apps/images-all/directory_uploads/:class/:id/:basename:no_original > _style.:extension" > > However, the same process on the production box (A CentOS Xen VM) produced: > > $ script/console production > Loading production environment (Rails 2.3.4) > >>> require 'environment' >>> > => true > >>> Radiant::Config["assets.path"] >>> > => nil > > I¹ve verified that the correct environments/production.rb file is on the > production system as well. Also, it may be beneficial to mention that we > were seeing successful uploads to the default filesystem location > (RAILS_ROOT/public/assets). > > It would be helpful to know if the above method is indeed the correct way to > configure the asset path. If so, then we will continue working to resolve > the issue on our production systems. > > Many thanks, > > Peter > > ___ > Radiant mailing list > Post: Radiant@radiantcms.org > Search: http://radiantcms.org/mailing-list/search/ > List Site: http://lists.radiantcms.org/mailman/listinfo/radiant > Radiant: http://radiantcms.org > Extensions: http://ext.radiantcms.org > > ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
Re: [Radiant] Configuring asset path for Paperclipped
Or, does one simply "jam" the value into the config table? > From: Peter Degen-Portnoy > Reply-To: Radiant Mailing List > Date: Wed, 24 Feb 2010 11:38:59 -0500 > To: Radiant Mailing List > Subject: [Radiant] Configuring asset path for Paperclipped > > Hi Folks, > > We are just about ready to launch and our experience with Radiant, the > extensions and the community has been great. > > I¹m hoping that I could get some help in understanding how to manage the > configuration of the asset path for the Paperclipped extension version > 0.8.0. > > We have two production servers with a common NFS mounted directory so that > regardless of which server handles the image upload, both servers will see > the same image. > > Is it correct to use the Radiant:: Config[³assets.path²] to configure this > value? If so, it is then correct to place this setting in the > vendor/radiant/config/environments/production.rb file? I¹ve tried different > configurations, such as using the config/environments/production.rb file, > but that causes an ActiveRecord error (no surprises there). > > To verify the correct setting of the configuration value, I did the > following on my dev system: > > :script/console production > Loading production environment (Rails 2.3.4) >>> require 'environment' > => true >>> Radiant::Config["assets.path"] > => > "/var/www/apps/images-all/directory_uploads/:class/:id/:basename:no_original > _style.:extension" > > However, the same process on the production box (A CentOS Xen VM) produced: > > $ script/console production > Loading production environment (Rails 2.3.4) >>> require 'environment' > => true >>> Radiant::Config["assets.path"] > => nil > > I¹ve verified that the correct environments/production.rb file is on the > production system as well. Also, it may be beneficial to mention that we > were seeing successful uploads to the default filesystem location > (RAILS_ROOT/public/assets). > > It would be helpful to know if the above method is indeed the correct way to > configure the asset path. If so, then we will continue working to resolve > the issue on our production systems. > > Many thanks, > > Peter > > ___ > Radiant mailing list > Post: Radiant@radiantcms.org > Search: http://radiantcms.org/mailing-list/search/ > List Site: http://lists.radiantcms.org/mailman/listinfo/radiant > Radiant: http://radiantcms.org > Extensions: http://ext.radiantcms.org ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org
[Radiant] Configuring asset path for Paperclipped
Hi Folks, We are just about ready to launch and our experience with Radiant, the extensions and the community has been great. I¹m hoping that I could get some help in understanding how to manage the configuration of the asset path for the Paperclipped extension version 0.8.0. We have two production servers with a common NFS mounted directory so that regardless of which server handles the image upload, both servers will see the same image. Is it correct to use the Radiant:: Config[³assets.path²] to configure this value? If so, it is then correct to place this setting in the vendor/radiant/config/environments/production.rb file? I¹ve tried different configurations, such as using the config/environments/production.rb file, but that causes an ActiveRecord error (no surprises there). To verify the correct setting of the configuration value, I did the following on my dev system: :script/console production Loading production environment (Rails 2.3.4) >> require 'environment' => true >> Radiant::Config["assets.path"] => "/var/www/apps/images-all/directory_uploads/:class/:id/:basename:no_original _style.:extension" However, the same process on the production box (A CentOS Xen VM) produced: $ script/console production Loading production environment (Rails 2.3.4) >> require 'environment' => true >> Radiant::Config["assets.path"] => nil I¹ve verified that the correct environments/production.rb file is on the production system as well. Also, it may be beneficial to mention that we were seeing successful uploads to the default filesystem location (RAILS_ROOT/public/assets). It would be helpful to know if the above method is indeed the correct way to configure the asset path. If so, then we will continue working to resolve the issue on our production systems. Many thanks, Peter ___ Radiant mailing list Post: Radiant@radiantcms.org Search: http://radiantcms.org/mailing-list/search/ List Site: http://lists.radiantcms.org/mailman/listinfo/radiant Radiant: http://radiantcms.org Extensions: http://ext.radiantcms.org