Displaying 20 results from an estimated 7000 matches similar to: "simple-rss caching"
2013 Mar 02
3
Following railstutorial.org tutorial, how to make the microposts be seen by all?
I am a new learner of Ruby on Rails.
I followed through the railstutorial.org tutorial and I''m trying to
learn off the sample demo app where you can to make microposts and only
the people who are "following" you can see them.
If I wanted to make it so every user can see microposts as an additional
functionality, what are the steps to do that?
--
Posted via
2008 Apr 22
2
How to convert time from rss feed to another format ?
Hi,
I need to parse the rss feed and use the pubDate field to generate a
field in a xml file to use as an input to simile timeline. RSS returns
the pubDate as :
Sun Feb 24 06:33:32 UTC 2008
But I need it as a string :
"Feb 24 2008 06:33:32 PST"
When I do :
...
@dt=feed_item.time
@dt=@dt.to_date
word_date=''%b %d %Y %H:%M:%S %z''
puts @dt.strftime(word_date)
...
2006 Apr 29
3
Feedtools question
I use feedtools to generate the feeds and read them,and now they can not
work well:
This is the code for feed generating:
class FeedsController < ApplicationController
def userrss
@user = User.find_by_id(params[:id])
@articles = @user.articles(:all,:order => ''updated_at desc'')
@headers["Content-Type"] = "application/xml; charset=utf-8"
2006 Apr 30
2
Rss feed items disappear using feedtools?
I have met a problem on Feedtools and felt very confused about it:
The feed that I generated using feedtools can not be read correctedly by
feedtools,while rss from other websites can be read.
Still,the code for rss generating:
def userrss
@user = User.find_by_id(params[:id])
@articles = @user.articles(:all,:order => ''updated_at desc'',:limit
=> 15)
2006 Feb 14
7
Action when database changes
Hello,
Is it possible to trigger an action in a controller when
a table from database changes?
I thought about using an utility like cron (railscron) to
check every, e.g. 2 s, if the table changed, but I am wondering
if there is a solution a bit more ''elegant'': to trigger an action
exactly when the change is made.
Best regards,
--
Kuba Nowak
2006 Jan 31
1
view vs controller - data from multiple tables.
Hi all,
please pardon my question if it seems silly.. I''m trying pretty hard to
learn though. :)
I have 2 tables:
feeds (has_many feed_items)
feed_items (belongs_to feed)
Let''s say Feeds has 3 feed.names: "Things that Start with A", "Things
that start with B", "Things that start with C".
I want to print out, on one page, something like the
2006 Jul 03
2
Strange local requests with Apache 2.2, mod_proxy_balancer, and Mongrel 0.3.13.2
Hello all,
My Rails app is logging some rather strange requests:
Processing StoreController#index (for ::1 at 2006-07-03 13:18:48) [GET]
Session ID: ed5e2a0e5b4b9290835a969cdd749e6e
Parameters: {"action"=>"index", "controller"=>"store"}
Completed in 0.08174 (12 reqs/sec) | Rendering: 0.07951 (97%) | DB:
0.00000 (0%) | 200 OK [http://127.0.0.1/]
2006 Aug 11
5
Unit tests - NilClass problem
Hi!
Yesterday I started to write my unit tests for the fist time using
rails. I''m using this method:
http://blog.codahale.com/2005/12/23/a-rails-howto-simplify-your-unit-tests/
My customer_test.rb looks like this:
require File.dirname(__FILE__) + ''/../test_helper''
class CustomerTest < Test::Unit::TestCase
fixtures :customers
# Replace this with your real
2006 Oct 10
6
"MySQL server has gone away" with Apache 2.2 + Mongrel cluster
Hi
I just setup a server (Apache 2.2, mod_proxy_balancer, mongrel_cluster) with
2 Rails applications according to this excellent Post:
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you
Everythings works great, but after a long inactive period (say one night),
the first 3 connections allways get an Error 500
Excerpt from production.log:
...
2007 Jul 19
0
[mongrel_cluster] hosting multiple web sites via apache mod_proxy_balancer
I''m newbie to mongrel,
I''m not able to config mongrel_cluster in order to host multiple web sites added/remove as apache VirtualHost.
I followed codahale http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
mixed with Wiki Radiant (I use Radiant as a rails apps to be deployed, 1 domain 1 radiant sites with its own document tree
2008 Apr 10
2
Testing an action behind HTTP Authentication
Greetings,
I''m writing an integration test and would like to make sure that, with
the correct credentials, I get the proper response. The problem is I
don''t know how to use the ''get'' method to attach the username and
password to the request.
For example, when using RSpec''s Story tests..
When("I request the user information for that
2006 Jul 07
10
problem serving pdf files
I''m using the instructions from
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/to
configure mongrel_cluster with apache mod_proxy_balancer. Everything
works fine, except when I try to link to a pdf file to be opened in a new
window, it displays the contents of the pdf as text instead of opening it as
a pdf document through Acrobat.
2007 Jan 02
10
problems with apache 2.2 proxying to mongrel cluster
Hi all,
I''ve been having problems with the apache 2.2-mod_proxy_balancer-
mongrel setup.
My setup is:
CentOS 4.3
apache 2.2.3 (compiled from source) with mod_proxy_balancer
mysql 4.1
ruby 1.8.4
mongrel 0.3.14 (I know I need to update but I think this problem is
independent of the mongrel version)
mongrel_cluster 0.2.0
rails_machine 0.1.1
I have apache setup as per Coda''s
2006 Jul 11
8
Stop updated_at from auto updating?
Hi
Is there any way to temporarily stop the updated_at field from being
updated when a record is modified with ActiveRecord?
I have a date field which is keeping track of when the record data was
last checked by my application and my app manually updates it, of course
when I do this the updated_at field is also touched making it fairly
useless for finding out when the actual data was changed
2006 Dec 04
5
Log problem on stop/restart
I''m using the mongrel_cluster recipes for Capistrano as laid out by
codahale.com and the new ed. of the Agile Development book, but I''m
having problems on restart and stop:
I can start:
[root current]# mongrel_rails cluster::start
Starting 3 Mongrel servers...
And I can see 3 processes running:
[root current]# ps aux | grep mongrel
mongrel 1947 0.0 8.2 24684 10776 ?
2006 Aug 03
14
[WARNING] don''t use ruby-sendfile
Hi Folks,
I''ve been getting reports of people with serious stability problems in
Mongrel. These problems go away instantly when they remove
ruby-sendfile.
If your mongrel starts up saying that you have "sendfile installed" and
that it is using it then **you are wrong**. Remove the gem and don''t
use it.
I''ll be investigating why it doesn''t really
2007 Jan 03
12
Frustrating Error
I am followint this article,
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
...but I keep getting this error in the log...not sure what to try next...
** Daemonized, any open files are closed. Look at log/mongrel.8000.pid and
log/mongrel.log for info.
** Starting Mongrel listening at 127.0.0.1:8000
2006 Jul 20
5
Apache 2.2, Mongrel and #caches_page
Hi !
I''m no expect when it comes time to configure Apache. I just enabled
page caching in my Rails app, and am now looking at making Apache
serve the cached files instead of calling into Rails.
I know Mongrel is able to serve cached files if it finds them, but I''d
like Apache to do it.
Looking at .htaccess, there is this section:
RewriteEngine On
RewriteRule ^$ index.html
2006 Apr 03
4
Edit in Place in 1.1
Does anyone have a good example or know of some documentation about
how to implement "Edit in Place" using Rails 1.1? Like the
functionality in Flickr... I''ve googled and googled and can''t find any
good documentation. Maybe it''s because 1.1 is so new? Thanks in
advance.
-Andy
2006 Dec 18
4
How to keep mocks consistent?
Hey all,
Here''s a question for everyone: how do you keep your mocks and stubs
consistent with your real objects?
I''m dipping my toes into the RSpec world, and it''s absolutely
delightful (running dozens of tests in less than a second is nice as
well), but I''m concerned about my ability to keep the mocks in my
specs consistent with the behavior of their