similar to: Download an Image using Net::HTTP

Displaying 20 results from an estimated 1000 matches similar to: "Download an Image using Net::HTTP"

2006 Mar 13
8
Nested find(:all, :include => ) statements
Is there a way for me to do: OrderItem.find(:all, :include => [:user, :product => [:supplier]] So I don''t have a supplier_id on my order_item, but have it on my product, which is part of order_item. Joerg -- Posted via http://www.ruby-forum.com/.
2005 Dec 28
4
Changing encoding on text
Hello, I have a set of templates creating some files for me. All data on my site is encoded using iso-8859-1. Now I want to save the text in the file using utf-8. I have tried using iconv, but whenever I have the require "iconv" statement in my model, there is some error happening in the model and the model doesn''t get loaded (not sure how to debug that). What approches to
2006 Feb 14
7
Launching a standalone Rails app
Hi, I''ve developed a standalone Rails app - using tar2rubyscript and rubyscript2exe. The users aren''t going to understand that the''ll need to open the browser and go to 127.0.0.1:3000 to view the app, after running the exe. I am wondering whether other people have tackled this problem in the past, and how they went about solving it. One way would be to write a
2005 Dec 21
4
How can I taalk to our AS/400?
Hello, I can do this in java, but want to use Rails. How can I connect to our AS/400? Thanks Frank _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
2006 Jul 17
14
REST Relationship Models
I''m trying to figure out an elegant way to do this: I have the following three tables: people, employer, employees And consequently the following three models: class Person < ActiveRecord::Base end class Employer < ActiveRecord::Base has_many :employees end class Employee < ActiveRecord::Base belongs_to :person belongs_to :employer end I want to be able to say:
2007 Nov 21
7
describe scope
Hi, Googling ''RSpec describe scope'' didn''t yield much, so apologies if this question has been dealt with. It seem well known that a ruby class is ''visible'' between describes, and if this is a problem then you should use some counter as prefix or suffix: ''class Item_001; ... end'' Is there any work underway, or sheduled release where
2006 Mar 31
2
Backslash Escaping in View
Ok, I''m hoping this won''t be a forehead slapper, but take a look at this code: physician.name.sub(/''/, "\\''") I''m trying to substitute a single quote with a backslash and a single quote. This seems pretty simple right? Well, someone kick me and tell me why it''s not :) Here''s what I''m getting if the
2006 Mar 15
7
O''Reilly Rails Cookbook on Rough Cuts
Subject says it all. Anybody taken a look yet? http://www.oreilly.com/catalog/railsckbk/?CMP=ILC-GG7423313304&ATT=railsckbk After buying the Ruby Cookbook and the other Rails book, I''m pretty gunshy about another Rough Cuts purchase. Sean
2006 Oct 24
1
Broken thread Safe connection Management on Mysql (Mysql too many connections errors)
Hi, There is an issue on socket connection with backgroundrb (rev 47) and mysql backend: after a certain number of job you reach the mysql connection limit as socket are never closed and nobody can connect to mysql anymore till you stop the backgroundrb daemon. Already reported on: http://rubyforge.org/pipermail/backgroundrb-devel/2006-July/000066.html,
2006 May 31
7
How to render from with <%%> ?
I have a loop that I iterate through in my view. <% coll.each do |itm| puts(itm.value) end %> How do I render the itm.value without using a <%= %> tag? Should puts not work? Joerg P.S. There is a good enough reason for me wanting to do this :-) -- Posted via http://www.ruby-forum.com/.
2006 Jul 31
6
Unable to install Gems with RubyGems on Intel OSX with DarwinPorts
I followed Duncan Davidson''s Sandboxing Rails with Darwin Ports guide and everything went fine up till the part where I had to install gems using gem install. I would get this stacktrace: Attempting local installation of ''rake'' Local gem file not found: rake*.gem Attempting remote installation of ''rake''
2006 Jan 12
8
Synching between Sqlite and MySql
Hi folks, I am running an offline Rails app that periodically connects to the Internet to download the latest catalogue, and upload any new orders. I am about to implement the synching bit - and was thinking whether there is any other solution other than writing webservices and code to do a manual sync of the data, or whether there is a more nifty and robust way using say replication?
2007 Jan 25
1
Link to possible code for symbolic chmod
I''m not sure if this is perfect, but it seems to work well for me so far. I haven''t tried to integrate it into Puppet because I''m still a bit new to Ruby. http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/96956 Trevor _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com
2006 Jan 16
2
Curl help
I''ve been searching around for a curl implementation on ruby and havn''t had much luck. I have run into open-uri and Net::HTTP but they just arnt as robust as curl. The closest thing i found was this previous thread from July http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/149926 on using ruby-dl to load libcurl. Has anyone gotten any farther on this
2007 Nov 09
2
RubyConf 2007 - Thoughts?
Hi, For those of you that attended RubyConf 2007, what were your impressions? Any more thoughts on JRuby, Rubinius, IronRuby or Wuby? Regards, Dan
2007 Jan 29
4
loading C extension in worker causes bus error on OS X only
In all likelihood, this doesn''t have anything to do with backgroundrb, but I''m stuck so I thought someone might be able to help. I have a pretty simple C extension that I built into a gem and have installed on my system. It works fine when required from rails (1.2.1). But when I have a Backgroundrb worker class use the extension (under os x), I get:
2007 Feb 26
5
Continuing a "specify" block after failure
I have some high-level acceptance tests that read a bunch of files, process them, and then confirm that the processed output matches the expected output. That is, for each file "a.input" I have a corresponding file "a.expected" and I basically want to churn through all of them producing "a.processed" and making sure that "a.processed" equals
2006 Aug 10
1
Passing parameters defined in a function or something
Hi, I have method I want to call ... it can receive * number of parameters. I also have 3 parms that I want to pass often, so I have defined them in a separate function: def my_params { :parm1 => 1, :parm2 => 2, :parm3 => 3 } end And I want to call my method like this: mymethod :parm4 => 4, my_params Now - this doesn''t work - as my_params is a hash of params, which
2006 Jul 19
2
SimplyRestful bug?
Hi I have my routes set up like this: map.resource :contact, :path_prefix => "/employers/:employer_id" so now when I view all contacts for an employer I go to: /employers/1/contacts That works. On that page, there''s a problem with the routes: new_contact_url translates to: /employers/1/contacts/new ... so that works. But, contact_url(@contact) gives me
2006 Jan 10
2
Returning :success or :failure to remote function calls
Hi, When calling remote functions (AJAX), I can test for :success and :failure. But how do I return a :success or :failure to my AJAX function call from my action? Thanks Joerg -- Posted via http://www.ruby-forum.com/.