Displaying 20 results from an estimated 6000 matches similar to: "imagescience"
2007 May 23
8
ImageScience, Mini-Magick and RMagick
I''m going to be generating thumbnails from user uploaded images. I''m
looking around at the libraries available to do this sort of thing and
there are three that look promising.
ImageScience -- http://seattlerb.rubyforge.org/ImageScience.html
Mini-Magick -- http://rubyforge.org/projects/mini-magick/
RMagick -- http://rmagick.rubyforge.org/
It looks like a lot of people are
2006 Dec 15
6
RMagick=bad, ???=good
I know that Zed has made mention of the fact that using RMagick with
mongrel and rails is a bad thing. I''m currently using FlexImage (which
in turn uses RMagick) on my application and really haven''t had too
many problems. We get a restart for memory usage every 8-10 hours on
one mongrel of twelve running, but I''m not sure if that''s an RMagick
issue. Either way,
2007 Feb 06
1
Attachment_fu ImageScience FreeImage thumbnail quality
I''ve tried migrating acts_as_attachment to attachment_fu (just to see
if I could replace RMagick with ImageScience+FreeImage), but the
quality of the thumbnails is just horrendous, blurred beyond
recognition (downscaling a 1280x1024 to a few considerably smaller
thumbnails).
Changing attachment_fu to use RMagick again and the thumbnails were
crispy sharp again.
I was wondering
2007 May 14
6
ActiveResource and RESful edit
Hi
I''d like to know how to have ActiveResource generate a URL for the
/teams/1/edit
type of resource.
I''ve got custom_methods.rb and have used
Team.find(1).get(:edit)
This generates
http://localhost:xxxx/teams/1/edit.xml
But all I get returned is a hash of the attributes (in this case of
team 1), rather than an object of team 1.
In other words the
2006 Oct 31
12
Moving page_cache_directory
Howdy. I''m working on a RoR CMS and need cached pages to all be in
public/cache rather than public [in order to set svn:ignore on all the files
properly]. I can get page_cache_directory set correctly and the pages are
cached in the right place but Mongrel isn''t serving them because it''s only
looking for them in public. During development I know I can set -r
public/cache
2006 Nov 20
7
Acts as attachement
Hi guys
Question about acts as attachment still getting the following error
undefined method `content_type''
I have set everything up according to the following page however i am
still have trouble
http://weblog.techno-weenie.net/articles/acts_as_attachment
One thing, I have wanted to add this to an existing model in my system.
I have not used the...
script/generate
2006 Feb 08
8
Liquid with database?
Hello,
Just wondering if someone here as successfully ported Liquid to use with a database. I would like to try it out but not sure how Liquid integrates with current templates.
Thanks
Frank
---------------------------------
Yahoo! Mail - Helps protect you from nasty viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2007 Sep 09
4
Images larger than 40k uploaded with attachment_fu won't display
I have a problem displaying images when using attachment_fu. When I
try to display the image, only about 40k appears in the browser, and
with some images even that much is not visible (just garbage when I
view source). I can display images smaller than 40k correctly.
I''m storing the images in the database (mysql) and haven''t tried
storing in the file system to see if that works
2007 Jun 26
3
what is the :or parameter in a submit_tag ?
I read the following tag in teh Beast example
<%= submit_tag''Login'', :or => link_to_function(''forgotten password'',
"$(''reset-password'').toggle();") %>
I understand the link_to_function, but what is this :or parameter used
for ?
the link doesn''t appear, so it cannot be used...
thanks for your lights
kad
--
2007 Jul 24
9
will_paginate plugin doesn't work with Association Extensions?
I have:
class Post < ActiveRecord::Base
has_many :comments do
def published
find( :all,
:conditions => {:published => true} )
end
end
end
When in my controller I do
Post.find(:first).comments.published.paginate :page => params[:page]
I get an error
undefined method `paginate'' for []:Array
Is will_paginate supposed to
2006 Aug 10
6
Login Restfully
In DHH''s keynote, he alluded to doing logins with REST. Has anyone
implemented this, and if so, would you mind elaborating on how you did
it please?
Thanks in advance.
--
Posted via http://www.ruby-forum.com/.
2006 Oct 22
7
GzipFilter gemplugin now available
This GemPlugin will gzip your HTTP responses from mongrel if the
client says that it supports it (eg, most modern browsers). I''ve
tested it in IE6, Firefox 1.5 and Firefox 2.0RC3
Install:
gem install gzip_filter --source http://edenli.com
Configure (assuming rails):
cd RAILS_ROOT
echo ''uri "/", :handler => plugin("/handlers/gzipfilter")''
2007 May 05
3
DB trigger vs before_create
Hello everyone,
I''m having trouble figuring out which approach is better.
I have the following tables: products, orders and line_items.
Every time an Order is placed, the quantity field in the products
table has to be updated for each LineItem in the Order. One option is
to use DB triggers which is not as portable as using before_create in
the Order model. But with before_create I cannot
2006 Sep 16
10
Mongrel and Sandbox
Z-Man,
DHH recently said:
"And [_why''s] latest work on sandbox looks stellar.
Making it drop-dead easy to run multiple Rails
applications in the same Mongrel process without
conflicts. Thumbs up to both him and Matz for getting
Sandbox on track for inclusion with the next Ruby
release."
Does that mean what I think it means - that one or
more Mongrel processes may one day be
2007 May 10
13
REST own action
I can sent my own action to a users_controller stating in routes.rb
map.resources :users, :member => { :network => get }
I defined in my users_controller the network action....
so I can have an url like
"http://localhost:3000/users/168.xml;network"
now I would like to have another action network_plus which is a little
bit different fron the network..
sure, I can state another
2006 Nov 17
6
RESTful routes and resulting urls
if I have the following in my routes.rb:
map.resources :product_categories
it provides urls such as:
/product_categories
/product_categories/1
/product_categories/1;edit
etc.
and uses the ProductCategories controller.
how can I keep the same controller (and model) but set up the resources
so that I can have any abitrary url point to the existing controller,
much like specifying the controller
2007 Mar 01
4
Cookie based session management problems
Edge has a change in default behaviour where sessions are stored as
cookies instead of in the file system. This was a pleasant surprise when
I synced up, fired up my app, and nothing worked. Ah, life on the edge.
I''m sure I''m just missing something, but I can''t get sessions to survive
the first redirect. I added the following code to environment.rb, based
on
2007 Jun 11
2
Builder::XmlMarkup and dashes
Has anyone hacked Builder::XmlMarkup to dasherize underscore tags by
default? I know I can use tag!, but I''d like to find a way for it to
translate underscores to dashes automatically. In other words:
xml.department_manager do
"fred
end
#=> <department-manager>fred</department-manager>
I tried hacking Builder::XmlBase.method_missing but got myself all
twisted up!
2006 Oct 13
2
form_for() and name
how can i give name attributes for form_for(), so it will give an output
like <form name="f">. it is because that i need to access the form name
for javascript manipulation.
as far as i know, name can only used in form_tag(), but i currently have
more than 50 forms that built using form_for(). the structure is like
this:
<% form_for symbol, item,
:url => { :action
2006 Oct 19
8
Mongrel::HttpHandlerPlugin
Hi,
I''m trying to write a file upload monitor for mongrel that uses
juggernaut to alert the browser of a change. I''m writing a plugin that
uses Mongrel::HttpHandlerPlugin but it looks like the only method that
gets called is process and that is only when the upload has finished.
I''m setting the following:
@request_notify = true
But I am still only getting process to