similar to: Getting (and displaying) REST data

Displaying 20 results from an estimated 1000 matches similar to: "Getting (and displaying) REST data"

2005 Dec 28
4
undefined method `include''
I''m getting this error in Rails: undefined method `include'' for #<MenusController:0x408efd1c> The offending code is: require "rexml/document" include REXML I see there may be a problem with GCC 4 on OSX, but I''m using Redhat with GCC 3.2. http://weblog.rubyonrails.org/articles/2005/12/22/is-gcc-4-0-incompatible-with-ruby-on-os-x-and-elsewhere
2005 Dec 24
3
Avoiding HABTM field clobbering?
>From the docs: "Note that any fields in the join table will override matching field names in the two joined tables. As a consequence, having an "id" field in the join table usually has the undesirable result of clobbering the "id" fields in either of the other two tables." I do have an ID field in the join table, and as a result it''s clobbering the ID
2005 Dec 28
8
Rails app lags after inactivity
Hi all. I have two Rails applications. Each is on its own VPS hosted by Pipespring (excellent service btw). My app runs lightning quick - AFTER the first load. If I visit my site after a period of inactivity (i.e. no visitors to my site), it takes up to 10 seconds to load that first time. After that I can hop around with no problems. Has anyone run into this before? Ideas? - Rabbit
2005 Dec 23
1
Handling file uploads & mixing class and instance vars
Hey Everybody, This is the only way I''ve been able to get my file upload to work: class Item < ActiveRecord::Base def file=(upload) @file=upload end def after_create File.open("public/items/#{self.id}.jpg", "w") { |f| f.write(@file.read) } end end The upload form has "file_field ''item'', ''file'',
2006 May 11
7
Rails in Dr. Dobbs Journal ?
Hi, I''ve read that Dr. Dobbs Journal''s last issue has a cover article about Rails titled "Ruby On Rails - Java''s Successor?". Can''t find anything about it in http://www.ddj.com Does someone have the paper edition and can confirm that, and tell how the article looks like, and so on. Thanks, -- Jean-Fran?ois. -- ? la renverse.
2006 Feb 07
4
Dynamic url with javascript? - Help Please
Hi, I''m trying to call a remote function when a combobox option is selected, passing as an argument the current value of the combobox (paramenter "panel_id": <select id="server_interface_jack_switch_panel"
2006 May 16
18
Ruby''s purpose?
Before I get flamed, I just want to start off by saying that I am new to Ruby and I really enjoy this language and want to see it succeed. But, what niche does this language fill? These are serious question, not a put down of the language. Does it has something to offer for Web 2.0? Is it just another scripting language? Does it suppose to replace something else? Does it suppose to work with
2006 May 31
2
I''m Collecting Media Refernces for Ruby and Rails
I''m trying to collect media references (URLs) to articles, podcasts, and videos about Ruby and Ruby on Rails, like this month''s Linux Journal ( http://www.linuxjournal.com/issue/147) or the recent DDJ article ( http://www.ddj.com/dept/architect/187203512). If have such a collections yourself (or just know of some good references), could you please share them on this thread.
2006 Jan 06
3
Countries -> Cities Select box
I am trying to play with a Countries -> Cities dynamically updating select box.that is if someone selects a country then all the cities of that country must be listed.Does anyone know of any data source for this? I searched for it but couldnt find any good usable source. Better still is there a module which I can mixin for this? Thanks Vivek -------------- next part -------------- An HTML
2006 Feb 07
17
Easy way of dealing with nil properties in templates?
Is there an easy way to deal with nil properties in templates? All I''m aware of are these methods, and it''s quite tedious and surely violates DRY. <%= @member.name unless @member.name.nil? %> <%= @member.name.to_is %> <%= "#{@member.name}" %> csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the
2006 Jan 21
6
Redirecting in a view?
Is there a way to do this in a view? <% redirect_to ''http://url.com'' %> All I can think of is outputting a link and using Javascript to click it, or probably do something like ''doc.location(url)''. csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2005 Nov 06
11
Ideal Rails / Apache config?
Hi All, Just about to set up RoR on our server and was wondering what the ideal setup for RoR is these days? Apache 1? Apache 2? fCgi? Any guidance would be helpful! Thanks, -Adam
2006 Feb 04
4
Page caching feeds and cache file extensions
I have a feeds controller which generates RSS and Atom pages. I put ''caches_page :show'' in it. The problem is that the pages are saved with an html extension. As a result, browsers display the cached feeds as HTML rather than XML, and feed validators complain. There''s an option to set ''Base.page_cache_extension'' globally, but I don''t want
2008 Aug 21
1
Kruskal.test() on lists
Hi, I am trying to do a kruskal wallis test on two lists, fVisited and cSN: fVisited[[1]] [1] 0.17097623 0.30376141 0.17577266 0.14951855 0.03959753 0.08096217 0.05744888 0.02196257.... .... cSN[[1]] [1] 0.08557303 0.36477791 0.19601252 0.12981040 0.05351320 0.10385542 0.03539577 0.03106175.... So if I just want to do a test on just one of the entries this is simple enough:
2006 Feb 13
2
categories and admin/categories - different controllers and templates?
Is there some way to have these two sets of URLs use totally different controllers and templates? categories/list categories/show/1 admin/categories/list admin/categories/edit/1 admin/categories/destroy/1 admin/categories/update/1 Besides, of course, using different controller names ;). The first URL is publicly accessible, while the second contains admin functions. Also, with the second,
2005 Dec 01
12
Difficult process of restarting SCGI, Lighttpd, Apache, sessions
I''ve managed to get Rails working using Apache->Lighttpd->SCGI. Restarting everything is really difficult. This appears to be the process: - stop apache - stop lighttpd - stop scgi - make sure scgi still isn''t running (it sometimes does) - if it is, kill it - delete all session files (they often cause permission errors) - start scgi - start apache - start lighttpd - cross
2005 Nov 22
11
Building a conditions clause (for find) of multiple optional params?
I want to be able to find items according to various params - category_id, member_id, type_id, rating, etc. What I have now is something like: if(@params[''category_id'']) @items=Item.find(:all, :conditions=>["category_id=?", @params[''category_id'']) elsif(@params[''category_id''] and @params[''member_id''])
2006 Jan 11
2
map.connect - redirect with 302?
Is it possible to write map.connect rules in route.rb that externally redirect (HTTP 302) to other actions? thanks csn __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
2004 Apr 26
1
another entropy coder that might be very useful
Hello, I want to let you know about an algo that will soon be published and that may be of interest to Vorbis (and other Ogg projects) : http://f-cpu.seul.org/whygee/ddj-3r/ddj-3r.tgz this is the archive of the article i submitted. It describes the "Recursive Range Reduction" algorithm (3R for short) and uses only a few basic computer principles (a binary tree being the most complex
1999 Jan 02
1
SAMBA digest 1924
Hello, > I have the following entries, among others, in my smb.conf file: > ===== cut here ===== > logon path = \\%L\profiles\%U > [profiles] > comment = User Profiles > path = /usr/home/profiles > public = yes > writable = yes > browseable = yes > ===== cut here ===== > So, I expect 'net use z: /home' on a win95 machine to map z: to >