similar to: Creating new Magick::Image from uploaded data

Displaying 20 results from an estimated 2000 matches similar to: "Creating new Magick::Image from uploaded data"

2006 May 01
3
RMagick question ?
I have a file rmg.rb: require ''RMagick'' include Magick cat = ImageList.new("prod.jpg") cat.display exit The file prod.jpg is in the same directory as this file above. I execute the following: ruby rmg.rb I get the following output: /usr/lib/ruby/1.8/RMagick.rb:1377:in `read'': unable to open image `'': No such file or directory:
2006 Mar 08
3
List and update values from text_field_tag fields
Hi, I populate a couple of text_field_tag''s with data from an AciveRecord object. Some fields are editable and at the end of the page there''s a submit button. I want the new values to be updated in the DB but by default my original values are stored again. How do i go about doing this? thanks/jens AIM: jens.tinfors@mac.com Skype: jtinfors
2006 Jan 16
3
routing to controller inside module
Hey, am i to stupid to find the information about how to route to a controller in a module? Maybe module support has gone! The controller is under: app/controllers/admin/my_controller.rb The my_controller.rb file looks like this: module Admin class MyController def index render :text => ''Hello!'' end end end How does a route to all controllers under module
2007 Apr 19
2
invalid geometry string in change_geometry
I get the following error at the browser: ArgumentError in ImagesController#upload invalid geometry string `110×'' ... for the call to change_geometry with an explicit size (''110x'') as the geometry string: def make_thumb (the_img) require ''RMagick'' size = "110x" debugger if ENV[''RAILS_ENV''] ==
2006 May 30
1
Can''t read from file field second time around
This piece of code takes an uploaded image and resizes it. It''s a bit nasty at the moment as I am still messing around with it. What I can''t understand is why it works for one iteration but then fails with: zero-length blob not permitted `'' On the line: img = Magick::Image.from_blob(self.image).first I am basically doing this in the controller and it fails on the
2008 Dec 04
2
Does animated gif will work properly using RMagick?
Dear all, I have used RMagic to read and write a image while uploading. An animated gif was read from my local machine and was written in my images folder using RMagick. But the animated gif which i read was witten in my folder without animation. What should i do to write the gif image with animation. Here is my code to read and write image while uploading. image = params[:image][:blob]
2006 Feb 22
9
acts_as_habtm_list plugin
I''d like to announce acts_as_habtm_list plugin for rails. acts_as_habtm_list is a Ruby on Rails plugin, that can manage ordered lists through a join-table. It is providing almost the same Api as acts_as_list. The position column has to be defined in the join table. You can find additional information at: http://www.inlet-media.de/acts_as_habtm_list/ Install it executing this command
2006 Mar 08
5
object.save is not creating an insert statement
I have a model for a task class. When I try to save a task, for some reason no INSERT statement is being generated. Here''s the pertinent part of the development.log: ------------------------------------ Processing TasksController#create_fromProject (for 70.247.24.238 at 2006-03-08 14:20:30) [POST] Parameters: {"commit"=>"Create",
2006 Mar 15
4
help with DRY violation
I''m trying to be a good rails developer and fix DRY violations as i find them. However, i''m trying to fix this one, i cant seem to get it to work. I have two tables A and B that have a one-to-one relationship. Table B belongs_to Table A. Table A has_one Table B. I''m creating instances of Table A in different places, depending on the controller. However, for each
2006 Mar 04
4
Submitting data to two different tables with two different models
I''m very new to Rails. I''ve been reading Agile Web Dev for a while and read up on ruby, but I''m still learning. I designed a website for someone for an engineering shop. New projects had to be added manually. Well, I figured this would be a great canidate for railifying! I have the form working perfectly, you can add your data and get it in a table, and listing
2006 Apr 13
2
Rail''s basic idea
Hallo, what links would you recommend for an advanced programmer, who wants to know something about the basic idea and architecture of Rails. That''s no question for tutorials or howtos, but rather for theoretical documents and field reports. Can you help me? -- Norman Timmler http://blog.inlet-media.de
2006 Feb 13
3
file_column: uninitialized constant Magick
I am getting this following error when using file_column with RMagick: uninitialized constant Magick /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:200:in `const_missing'' ./script/../config/../vendor/plugins/rails_file_column/plugins/ file_column/branches/kyle/lib/file_column.rb:621:in `file_column''
2006 Mar 22
10
Need for multiple acts_as_list
I have a model "Childmodel" that belongs_to two other models "Parent1" and "Parent2". "Parent1" "has_many :childmodels, :order => :positionp1" and "Parent2" "has_many :childmodels, :order => :positionp2". i.e. The child is independently positioned within each of its parents. This works fine and gets me the useful
2006 Mar 24
19
Storing images in Ruby
Hi, I''d like to allow users to upload images and store those images in a Postgres database. I''ve looked through the example in "aguile development with rails" which suggests using the MySQL blob field. When I wrote a similar app in Java, we Base64 encoded the file and then stored it as a text field. Is this easy to do in RoR too? Any advice you can give me would
2006 Feb 16
1
Relative paths in Webrick vs. lighttpd
Hi, everyone. I''ve got a development server running Webrick, and a production server running under lighttpd. The following two lines of code work just fine in the development server, but bombs out on the production server with a "file not found" error: label_base_jpeg = "app/views/price_books/label.jpg" canvas = Magick::ImageList.new(label_base_jpeg)
2006 Mar 03
3
embedding a forum inside a rails app
what is the best way to embed a forum (phpbb is currently installed under /public/forums/) inside my layout ? I dont want the foum to be its own page i would like it to appear inside the main part of the page with navigation and border in tact. is this possible with the current way it is installed ? thanks adam -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Feb 28
6
Log Files in View
Is it possible to display the log files in the view? Thanks in advance. -- Posted via http://www.ruby-forum.com/.
2006 Mar 13
3
validates_associated problem
Hello, I have a situation where an ''employee'' belongs to a ''department'' and have setup the relationship as follows. class Employee < ActiveRecord::Base belongs_to :department, :foregin_key => "department_id" validates_associated :department_id end class Department < ActiveRecord::Base has_many :employees def validate_on_update
2006 Mar 23
3
Newbie: ''find'' across multiple relationships
For security purposes, I often want to find objects that are ''visible''. e.g. class Person < ActiveRecord::Base has_many :x end ... @person.x.find(params[:id]) as opposed to X.find([params[:id]). Simple enough for me. My question: Say we have - class Person < ActiveRecord::Base has_many :x, :class_name ''Z'', .... has_many :y, :class_name
2006 Apr 18
1
Anyone get mini-magick plugin working on windows?
Ruby 1.8.4, mini-magick 1.1.0, ImageMagick-6.2.7-0-Q16-windows-dll.exe. I downloaded and installed the mini-magick plugin into my vendor/rails directory. When I try to start webrick it fails, but it does not display any errors. It just simply returns me to the command line. "Ruby script/generate model test" won''t even work. It acts the same way. It doesn''t throw any