similar to: rails, passenger, and images

Displaying 20 results from an estimated 2000 matches similar to: "rails, passenger, and images"

2008 Dec 10
12
image_tag cannot show picture
Dear all I am new to rails. In view, I place the following code, but cannot show the picture in the webpage <%= image_tag("green.JPG") %> However, I can access the picture in this url http://localhost:3000/images/green.JPG The HTML source code generated <img alt="Green" src="/images/green.JPG.?1228211220" /> I cannot identify the problem. Please help
2009 Jul 20
1
CSS issue when using SubUri and Passenger
I am testing another application in local in my environment.rb I wrote config.action_controller.relative_url_root = "/elnino" config.action_controller.asset_host = "http://opticoaching.local" I defined correctly the vhost (I have already odne it for another app which is running well...) <VirtualHost *:80> ServerName opticoaching.local DocumentRoot
2006 Jan 04
1
[BUG?] image_tag
i''ve got the latest ruby and rails on this box and am seeing that image_tag will turn something like /foo/bar.jpg into /foo/foo/bar.jpg in the following situation: /ror/foo/public /var/www/html/foo -> /var/ror/foo/public/ image_tag("/foo/bar.jpg") this is exactly how compute_public_path is written to work: def compute_public_path(source, dir, ext)
2006 Feb 09
6
troubleshooting an observe_field
Hi, I''ve got a live_search field in a partial that is on several different pages. On all pages, except 1, it works fine. On the page it doesn''t work on, it seems it never executes it action. Here''s my observe_field code inside the partial: <h1><label for="searchtext">Live Search:</label></h1> <%= text_field_tag :searchtext
2005 Aug 07
8
Ajax forms and redirects
Here is an example that seems perfect for Ajax that I have not seen implemented nor can figure out how to do it. I am hoping someone can give me some pointers. On the sign-up page, I would like to do my validations (password length, username uniqueness,etc ) Ajax-style. But if all validates, then redirect to the success page. The combining of redirection to a new page with Ajax is throwing me.
2007 Oct 26
3
--prefix, url_for and image_tag
First time here, so I hope this isn''t a FAQ (although I did check *the* faq). I''m using mongrel_cluster with --prefix, and it is very slick. Thanks for that. But I had one problem. At one point in my little app, I have something like this: image_tag(url_for(:action => ''picture'', :id => 1), :size => "160x200") In this scenario,
2006 Jul 28
2
has_many :through with :order column on the join model
I have a model like so class Product < ActiveRecord::Base has_many :image_links, :order => :position has_many :product_images, :order => ''image_links.position'', :through => :image_links end The problem is that :order clause just gets ignored. How do you server records in a specific order when the order column is on the join model?
2009 Jun 05
17
passenger on localhost
I installed passenger at home. How should I configure apache to make it usable? This was my last guess: <VirtualHost localhost:3121> ServerName 127.0.0.1 DocumentRoot /var/www/html/docsearch/public </VirtualHost> This gets by "apachectl start" without complaint, but I really haven''t a clue what I''m doing ;) Do I need to access it via a different
2007 Oct 12
2
missing attribute: reorder
I am trying to use an integer object as a flag item for displaying a link on a page called reorder that is a column in my PlanProcedures table. I''m getting an error that says The Header is NoMethodError in Manage_plan_procedures#list missing attribute: reorder Here is what my model looks like: >> PlanProcedure.column_names => ["id", "plan_id",
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''] =
2009 Aug 04
2
Passenger, switching from development to production
It appears my http setup is working but I am getting an error when I try to use a web browser to connect. All I have done so far is to change the setting from what was working in httpd.conf and move it to ssl.conf (adding some ssl things) and I am using the same directory/set of files that was working for development. The error... Ruby on Rails application could not be started Phusion Passenger
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
2006 May 23
3
image_tag problem
Hiall, I want to make an image_tag from within a controller in order to be able to present a link (with a status image) in a view. Here is my controller method (in file webca_controller.rb, hence WebcaController) def untouched_status_image_tag image_tag("open", { :alt => "Offen", :title => "Offen", :size => "12x12", :class =>
2011 Apr 20
2
Cannot get progress bars to work w/ Apache Progress Module
I am following this screencast http://railsillustrated.com/screencast-file-uploads-progress-in-rails-passenger.html as well as comparing this against all the other rails Apache Progress Module progress bar examples and I can''t figure out why I am always getting a 404 routing error: ActionController::RoutingError (No route matches "/progress"): I have a feeling that
2008 Jan 31
3
Using facebooker AND Haml/Sass
For anyone using both and encountering trouble with stylesheets (specifically, the paths being incorrect in production mode)... Removing facebooker solves the issue. But I bet you don''t want to do that, eh? So, simply setting ActionController::Base.asset_host = '''' also works like butter. I''m not 100% clear on why asset_host has anything to do with
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 Mar 24
4
validate if different?
Hi, I seem to remember seeing the equivalent of saving only if all attributes are different. I can''t seem to find that now in the API or the agile book. I''m using the acts_as_versioned and only want to save if the input is different. Thanks, Steve http://www.smarkets.net -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Oct 18
3
#asset_url helper method
Just putting this out there before I make a pull request. Is there any interest in an asset_url method as a view helper? It would work by using the config.action_controller.asset_host if it exists and prepending this to the results of asset_path. I have found this necessary when writing html emails and needing a full url path for assets. Since my CDN in the asset_host mirrors my assets in my
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 Mar 10
15
facebooker is rewriting URLs even off of facebook canvas
The URLs for CSS/JS files are being rewritten to the address specified in the tunnel even when outside of the facebook canvas. Is anyone else having this problem?