similar to: Database Triggered Events in Rails.

Displaying 20 results from an estimated 5000 matches similar to: "Database Triggered Events in Rails."

2007 Sep 11
3
ActiveRecord, blocking or async, logging, syslog/udp
Here''s a gedanken experiment for those w/ far more knowledge than I about ActiveRecord, etc.: Let''s say my database is very remote and on a very slow machine. Let''s further say that my app has an action that leads to a very simple insert into the "impressions" table of the db, a la "INSERT INTO impressions(docid) VALUES($docid);" - and
2008 Apr 11
2
Can I do this, question
I have a bunch of real uses for BackgroundDrb, but I also a very simple need to delay sending an email for about 5 seconds after a rails action completes. Basically I need to leave time for the DB to commit and sync to the slaves before the email can be sent Is BackgroundDb the right tool for this job? Any other suggestions on ways to implement this? (I have seen suggestions to create a
2006 Jan 22
3
Download an Image using Net::HTTP
Hi, I need to download an image, and I''ve mucked about with Net::HTTP resp = Net::HTTP.get_response(''www.mydomain.com'', ''/test.jpg'') f = File.new("test.jpg","w") f.write(response.body) And various other combinations using HTTP.get etc. Anyway, I get an image, but it looks very psychedelic. This is obviously not the correct way.
2008 Apr 11
2
issues on Net:HTTP
in cotroller: @url=URI.parse(''http://google.com.sg/webhp'') @res = Net::HTTP.get_response(@clarifyurl) in view: <%=@res.body> this page displayed as 301 Moved The document has moved here what''s wrong with my code, I want to get the correct reponse HTML content from google. --~--~---------~--~----~------------~-------~--~----~ You received this message
2013 May 07
2
Net::HTTP
I''m looking at the documentation: http://ruby-doc.org/stdlib-2.0/libdoc/net/http/rdoc/Net/HTTP.html And I notice two uses of Net::HTTP. Both are using GET requests. But what''s the difference? When to use which? Net::HTTP.start(uri.host, uri.port) do |http| request = Net::HTTP::Get.new uri response = http.request request # Net::HTTPResponse object end uri =
2006 Feb 06
1
Check, and display, AIM status on rails page
Thought I''d post this in case it''s of use to anyone. Maybe even a recipe? It''s just some simple helpers to show AIM status on a webpage. I searched before coding it, and didn''t find anything similar. Maybe that''s because it was so simple :) These methods belong in a helper (such as app/helpers/application_helper.rb) # begin AIM helper methods def
2008 Jan 09
14
My Development Environment is WAY too slow (blame Vista)
I''ve broken away -- partially at least -- from the dark side. I''m a long-time MS dev. I heard about Ruby and RR from Scott Hanselman (http://www.hanselman.com/blog/). He''s a great blogger on things in the MS world but he''s always provided a broader perspective. And he found great beauty in Ruby and RR and said as much. I had the opportunity to try out
2010 Oct 31
1
Rails application Webservices
hi all, I have a rails application at http://electric-sky-98.heroku.com/products require ''net/http'' require ''uri'' res = Net::HTTP.get_response(URI.parse(''http://electric- sky-98.heroku.com/products.xml'')) puts res.body the above code gave me the xml file below: <?xml version="1.0"
2013 May 11
1
AMI Originate issue
Hi, I'm getting an issue while executing AMI Originate. I'm getting "extension does not exists" on Originate's Response, and on the other hand Asterisk CLI say "fwrite() returned error: Broken pipe" Please suggest me what is wrong. Muhammad Faheem ### my originate code block ...
2007 Jan 31
2
SystemStackError: stack level too deep
I''m testing the http module in console. BUt I got the following error. Anyone knows why? >> Net::HTTP.get_print ''www.google.com'', ''index.html'' SystemStackError: stack level too deep from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in `newobj'' from C:/InstantRails/ruby/lib/ruby/1.8/net/http.rb:451:in
2005 Dec 20
1
Problems w/ Flickr demo
I''m trying to alongside the Flickr demo, and I''m getting the following error. I''m not sure why, as my code matches up exactly with what''s in the video. I''d appreciate any help. RgBJA ----- OpenSSL::SSL::SSLError in Flickr#search SSL_CTX_new:: library has no ciphers RAILS_ROOT: script/../config/.. Application Trace | Framework Trace | Full Trace
2012 Mar 22
0
problems configuring cluster to lucci and virtual machines resource
I have Centos 6.1 and i'm configuring cluster with conga, lucci and ricci these services are installed and running without problem. I need this type configuration for a high availability of virtual machines which is run on kvm. My problem is at the time of configuring "service group", when i click to add appears the new windows wich say "add service to cluster" and i fill
2007 Aug 29
1
What makes Rails'' routes non-thread-safe?
I was reading here and there about the differences between Merb and Rails [1] and became curious about statements such as this: > It is threadsafe with configurable Mutex Locks (Routing is also > threadsafe) Having mucked with the routes system, I had this awful feeling that I don''t understand threading well enough to know if my contribution is "thread safe".
2007 Jan 01
0
Net::HTTP.get_response with local files "file://..."
Hi, In my application I fetch a webpage with Net::HTTP.get_response(url). For creating a unit test I don''t want to be depended on an internet connection. So I tried to give an url like that: "file:///c:/mydir/mypage.html" (this url works in webbrower). But it seems that this is not the right protocol for Net::HTTP. Is there any possibility to use such
2006 Jul 21
1
What''s wrong with this code?
I''m trying to interface with the flickr API to pull my photos into my site. I don''t want to use the "flickr.rb" gem, I''d like to do it the other way so I can learn (plus I had trouble loading the gem on my server). Anyway, here''s what I have: #Application.rb controller def get_response(path, http) request = Net::HTTP::Get.new(path)
2014 Jan 30
1
mail_log_events, but who exactly triggered events?
Hi. mail_log_events is nice addition but how to log who exactly triggered particular event? For example 5 users from 5 IP addresses uses single imap user/mailbox. One of them deletes email and I'm logging delete related events. The only logged thing is: dovecot: imap(user): delete: box=INBOX, uid=673287, msgid=<some at thing>, size=1230 which tells me nothing about who triggered
2013 Nov 25
1
"Would have triggered 'refresh' from 2 events" in /var/log/messages
Hi, I put a --noop into the rc file for puppet client and restarted it and watched it log the above message. My problem with the above message is it doesn''t give enough detail as to what was discovered and what the 2 events were (mode difference, file existence, etc.) Is there a way to up the logging level for a puppet agent --noop observation run? I tried adding --verbose in the rc
2007 Dec 21
4
I need some guidance
I''m building an http communicator class for a web service API wrapper and I''m trying to go through the BDD process in doing so. I''m having a bit of a struggle figuring out how to set up the tests in relation to isolating things appropriately as well as testing behavior vs testing implementation. Specifically, I''m trying to set up a post method on my
2006 Jul 07
0
Net::HTTP.get_reponse issues ...
Hi, I''m struggling a bit trying to interface with the Amazon ECS web service using Net::HTTP. The code I''ve got so far is ... def index search_artist = ''Pink Floyd'' amazon_params = {''Service'' => ''AWSECommerceService'', ''AWSAccessKeyId'' => ''[Removed for
2006 May 06
0
`connect'': undefined method `verify_mode'' for nil:NilClass
Am using Ruby 1.8.4. I am getting this error: /usr/lib/ruby/1.8/net/http.rb:565:in `connect'': undefined method `verify_mode'' for nil:NilClass (NoMethodError) from /usr/lib/ruby/1.8/net/http.rb:555:in `do_start'' from /usr/lib/ruby/1.8/net/http.rb:544:in `start'' from /usr/lib/ruby/1.8/net/http.rb:1031:in `request'' from