# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=558

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 559

---

## [Expire cache in rake issue](https://www.ruby-forum.com/t/expire-cache-in-rake-issue/121873)

<div class="topic-metadata">

**Author:** [@vinay](https://www.ruby-forum.com/u/vinay)\
**Replies:** 6\
**Last updated:** [September 8, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/expire-cache-in-rake-issue/121873 "2010-09-08T18:05:36Z")

</div>

Hi All, I am trying to expire a fragment cache in rake. I know that the best practice to expire the cache is in the Sweepers. But as I have to expire the cache at the end of the month I was thinking on the lines of do…

---

## [Routing error](https://www.ruby-forum.com/t/routing-error/194639)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 2\
**Last updated:** [September 8, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/routing-error/194639 "2010-09-08T18:05:14Z")

</div>

Am working my way thru Ruby on Rails Tutorial: Learn Rails by Example and am on this page: http://railstutorial.org/chapters/static-pages#top Am getting problems when I create an HTML page in the public directory whi…

---

## [Find\_by\_sql](https://www.ruby-forum.com/t/find-by-sql/194642)

<div class="topic-metadata">

**Author:** [@PalaniKannan\_K](https://www.ruby-forum.com/u/PalaniKannan_K)\
**Replies:** 8\
**Last updated:** [September 8, 2010, 5:57pm UTC](https://www.ruby-forum.com/t/find-by-sql/194642 "2010-09-08T17:57:02Z")

</div>

Hi, I am using find\_by\_sql (“SELECT \* FROM taxas WHERE taxon\_id = ‘39’”) in controller. Instead of ‘39’… I need to get variable from the user through view.rhtml. Kindly help me on this scripting. – With Regards P…

---

## [No output](https://www.ruby-forum.com/t/no-output/194650)

<div class="topic-metadata">

**Author:** [@ishu](https://www.ruby-forum.com/u/ishu)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 5:56pm UTC](https://www.ruby-forum.com/t/no-output/194650 "2010-09-08T17:56:36Z")

</div>

I am working on rails 9.10 n ruby 1.9 I have used rspec in the application. While using rake spec command, i am not getting any output. Help me at the earliest.

---

## [ActiveRecord::ConnectionNotEstablished error](https://www.ruby-forum.com/t/activerecord-connectionnotestablished-error/194601)

<div class="topic-metadata">

**Author:** [@bopritchard](https://www.ruby-forum.com/u/bopritchard)\
**Replies:** 3\
**Last updated:** [September 8, 2010, 5:28pm UTC](https://www.ruby-forum.com/t/activerecord-connectionnotestablished-error/194601 "2010-09-08T17:28:42Z")

</div>

I’ve attached my database.yml I’ve installed gem install activerecord-sqlserver-adapter But when I navigate to a simple page I get the ActiveRecord::ConnectionNotEstablished error Any ideas what I should be checking? …

---

## [On init webrick get older rails version (suddenly)](https://www.ruby-forum.com/t/on-init-webrick-get-older-rails-version-suddenly/194644)

<div class="topic-metadata">

**Author:** [@eserralv](https://www.ruby-forum.com/u/eserralv)\
**Replies:** 4\
**Last updated:** [September 8, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/on-init-webrick-get-older-rails-version-suddenly/194644 "2010-09-08T16:52:36Z")

</div>

Hi! I’m running rails 2.3.8, confirmed by the prompt (rails -v) I’m doing a project and on other occasions I have needed install nested forms. I followed the steps (Ruby on Rails — Nested Model Forms) This steps: …

---

## [Rails 2 to Rails 3 - How to convert this sql query?](https://www.ruby-forum.com/t/rails-2-to-rails-3-how-to-convert-this-sql-query/194649)

<div class="topic-metadata">

**Author:** [@dme69](https://www.ruby-forum.com/u/dme69)\
**Replies:** 2\
**Last updated:** [September 8, 2010, 3:55pm UTC](https://www.ruby-forum.com/t/rails-2-to-rails-3-how-to-convert-this-sql-query/194649 "2010-09-08T15:55:13Z")

</div>

Hello all, Can someone help me with this query ? Here is the query used in rails 2. The idea here is to obtain the top 10 widgets. Widget.find(:all, :select =\> ‘widget\_type\_id, COUNT(widget\_type\_id) AS widgettypeid’…

---

## [Expire\_fragment in observer/model? Works fine in Sweepers](https://www.ruby-forum.com/t/expire-fragment-in-observer-model-works-fine-in-sweepers/155702)

<div class="topic-metadata">

**Author:** [@marstoni](https://www.ruby-forum.com/u/marstoni)\
**Replies:** 2\
**Last updated:** [September 8, 2010, 3:20pm UTC](https://www.ruby-forum.com/t/expire-fragment-in-observer-model-works-fine-in-sweepers/155702 "2010-09-08T15:20:44Z")

</div>

I’ve pretty much tried everything, but it seems impossible to use expire\_fragment from models? I know you’re not supposed to and it’s non-MVC, but surely there much be some way to do it. I created a module in /lib/ca…

---

## [Call expire\_fragment from outside sweepers or controllers](https://www.ruby-forum.com/t/call-expire-fragment-from-outside-sweepers-or-controllers/145884)

<div class="topic-metadata">

**Author:** [@xponrails](https://www.ruby-forum.com/u/xponrails)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 3:18pm UTC](https://www.ruby-forum.com/t/call-expire-fragment-from-outside-sweepers-or-controllers/145884 "2010-09-08T15:18:10Z")

</div>

Hi all. I need to expire cached fragments from outside sweepers or controllers: I have a rake task that calls a method inside a module in the /lib directory. This task will be called at a scheduled time by a crontab …

---

## [Nested routes question](https://www.ruby-forum.com/t/nested-routes-question/194441)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [September 8, 2010, 2:34pm UTC](https://www.ruby-forum.com/t/nested-routes-question/194441 "2010-09-08T14:34:50Z")

</div>

Trying to convert my app (and brain) to RESTful routes from the old style. What is the accepted approach to nesting a resource within 2 other resources? Example: Models Person has\_many :scores Contest has\_many :sc…

---

## [\[JOBS\] HelloExpert.com is looking for Senior Technology Leaders (Director/VP of Engineering level)](https://www.ruby-forum.com/t/jobs-helloexpert-com-is-looking-for-senior-technology-leaders-director-vp-of-engineering-level/194648)

<div class="topic-metadata">

**Author:** [@iBloom](https://www.ruby-forum.com/u/iBloom)\
**Replies:** 0\
**Last updated:** [September 8, 2010, 2:31pm UTC](https://www.ruby-forum.com/t/jobs-helloexpert-com-is-looking-for-senior-technology-leaders-director-vp-of-engineering-level/194648 "2010-09-08T14:31:29Z")

</div>

HelloExpert.com provides free and personalized expert solutions anytime anywhere. The platform uses latest web 2.0, search engine, unified communication technologies to present a unique social-business concept to prof…

---

## [OpenSSL](https://www.ruby-forum.com/t/openssl/194634)

<div class="topic-metadata">

**Author:** [@zurich\_by\_night](https://www.ruby-forum.com/u/zurich_by_night)\
**Replies:** 4\
**Last updated:** [September 8, 2010, 11:52am UTC](https://www.ruby-forum.com/t/openssl/194634 "2010-09-08T11:52:13Z")

</div>

Hello anyone used OpenSSL before? Why do we need to pay for expensive SSL certs when there is OpenSSL which is provided free? Is there a difference? I’ve got an ecommerce website, and wondering if OpenSSL is enough? Y…

---

## [Link\_to with :method as :post](https://www.ruby-forum.com/t/link-to-with-method-as-post/194570)

<div class="topic-metadata">

**Author:** [@priyanka](https://www.ruby-forum.com/u/priyanka)\
**Replies:** 3\
**Last updated:** [September 8, 2010, 9:34am UTC](https://www.ruby-forum.com/t/link-to-with-method-as-post/194570 "2010-09-08T09:34:05Z")

</div>

Hello, I am using link\_to helper to post the request. i want to hide the extra parameters. so i have tried :method =\> :post also :post =\> true. but it’s not works for me. still it shows query string. can any one sugg…

---

## [New Gem: Rspec custom matchers for action caching](https://www.ruby-forum.com/t/new-gem-rspec-custom-matchers-for-action-caching/194635)

<div class="topic-metadata">

**Author:** [@wolframarnold](https://www.ruby-forum.com/u/wolframarnold)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 9:13am UTC](https://www.ruby-forum.com/t/new-gem-rspec-custom-matchers-for-action-caching/194635 "2010-09-08T09:13:01Z")

</div>

I’ve released a gem that lets you assert in rspec whether a given action or fragment has been cached. It works with memcached only. Example: lambda { get :index }.should be\_cached(controller, :action =\> ‘index’) A…

---

## [:select with find\_in\_batches](https://www.ruby-forum.com/t/select-with-find-in-batches/194621)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 9:08am UTC](https://www.ruby-forum.com/t/select-with-find-in-batches/194621 "2010-09-08T09:08:20Z")

</div>

How can I include a :select clause with find\_in\_batches. The following throws an error " Mysql::Error: Unknown column ‘users.id’ in ‘field list’: . Post.find\_in\_batches(:batch\_size =\> 100, :select =\> "users.id, users…

---

## [Unable to upload larger files](https://www.ruby-forum.com/t/unable-to-upload-larger-files/194331)

<div class="topic-metadata">

**Author:** [@amit-singh](https://www.ruby-forum.com/u/amit-singh)\
**Replies:** 7\
**Last updated:** [September 8, 2010, 8:18am UTC](https://www.ruby-forum.com/t/unable-to-upload-larger-files/194331 "2010-09-08T08:18:36Z")

</div>

hii, i am trying to upload some files to filesystem using rails application when i use small size file everything is perfect but i when goes for larger files i got error this is my code #this model file class DataF…

---

## [(Jobs) - FTE - Ror Developer for Social CRM/ Search Company on Market Street in SF](https://www.ruby-forum.com/t/jobs-fte-ror-developer-for-social-crm-search-company-on-market-street-in-sf/194636)

<div class="topic-metadata">

**Author:** [@bossfo](https://www.ruby-forum.com/u/bossfo)\
**Replies:** 0\
**Last updated:** [September 8, 2010, 8:08am UTC](https://www.ruby-forum.com/t/jobs-fte-ror-developer-for-social-crm-search-company-on-market-street-in-sf/194636 "2010-09-08T08:08:37Z")

</div>

Located next to Montgomery Street BART, also Muni & Caltrain Accessible. The company is profitable and growing and is in search of an engineer whose passion is using RoR to create rich applications used by millions. …

---

## [Rails 3.0.0 - ArgumentError (wrong number of arguments (3 for 1))](https://www.ruby-forum.com/t/rails-3-0-0-argumenterror-wrong-number-of-arguments-3-for-1/194591)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 3\
**Last updated:** [September 8, 2010, 7:31am UTC](https://www.ruby-forum.com/t/rails-3-0-0-argumenterror-wrong-number-of-arguments-3-for-1/194591 "2010-09-08T07:31:09Z")

</div>

Hey, I’m trying to upgrade an app and no matter what controller#action I call I am met with the error below and I am having trouble figuring out what’s causing it. Things to note: There isn’t any code in the Sessio…

---

## [ROR Training For Beginners @ Bangalore](https://www.ruby-forum.com/t/ror-training-for-beginners-bangalore/194627)

<div class="topic-metadata">

**Author:** [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 6:50am UTC](https://www.ruby-forum.com/t/ror-training-for-beginners-bangalore/194627 "2010-09-08T06:50:10Z")

</div>

Hi Everyone, I and my team are a group of RAILS enthusiasts working in Sumeru Software Solutions. We think one of the greatest strength of rails is its community. Over a period of time we have crystallized ideas to g…

---

## [Problems with ajax in Rails 3](https://www.ruby-forum.com/t/problems-with-ajax-in-rails-3/194622)

<div class="topic-metadata">

**Author:** [@isaacchiang](https://www.ruby-forum.com/u/isaacchiang)\
**Replies:** 0\
**Last updated:** [September 8, 2010, 3:29am UTC](https://www.ruby-forum.com/t/problems-with-ajax-in-rails-3/194622 "2010-09-08T03:29:59Z")

</div>

Dear all: I’m new to Rails and I’ve encountered some problems with ajax in Rails 3. My project is on a Ubuntu 10.04 LTS machine with ruby v1.8.7 and rails v3.0.0. I’ve changed my rails.js file according to : and a…

---

## [Stuck on something that should be so darn simple - link\_to a "foo\_bar" controller method?](https://www.ruby-forum.com/t/stuck-on-something-that-should-be-so-darn-simple-link-to-a-foo-bar-controller-method/194612)

<div class="topic-metadata">

**Author:** [@Rick\_R](https://www.ruby-forum.com/u/Rick_R)\
**Replies:** 3\
**Last updated:** [September 8, 2010, 3:16am UTC](https://www.ruby-forum.com/t/stuck-on-something-that-should-be-so-darn-simple-link-to-a-foo-bar-controller-method/194612 "2010-09-08T03:16:31Z")

</div>

Man, as a newbie as soon as I deviate just an inch from the hello world stuff I’m in all sorts of hurt:)… I have a controller (lets call it GroceryStoreController) that has an ‘add’ method (It can be foobar for all I …

---

## [Sql query with pagination](https://www.ruby-forum.com/t/sql-query-with-pagination/194611)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 3:04am UTC](https://www.ruby-forum.com/t/sql-query-with-pagination/194611 "2010-09-08T03:04:13Z")

</div>

I am Using will\_paginate plugin in a call like : @homes = Home.paginate(:all, :conditions =\> conditions… I want to have minimum and maximum price within all @homes searched. How would I do that efficiently? Since …

---

## [Cloning this repo is working, but the cloned app isn't](https://www.ruby-forum.com/t/cloning-this-repo-is-working-but-the-cloned-app-isnt/194619)

<div class="topic-metadata">

**Author:** [@daze](https://www.ruby-forum.com/u/daze)\
**Replies:** 0\
**Last updated:** [September 8, 2010, 2:37am UTC](https://www.ruby-forum.com/t/cloning-this-repo-is-working-but-the-cloned-app-isnt/194619 "2010-09-08T02:37:53Z")

</div>

I cloned the repo GitHub - dmonopoly/jdmedia: Media site for JDHS with git clone git://github.com/dmonopoly/jdmedia.git and got the app and everything. It’s an app in Rails 3, if that matters. Anyway, after “cd jdme…

---

## [Problem getting rails 3 to work](https://www.ruby-forum.com/t/problem-getting-rails-3-to-work/194616)

<div class="topic-metadata">

**Author:** [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Replies:** 1\
**Last updated:** [September 8, 2010, 2:25am UTC](https://www.ruby-forum.com/t/problem-getting-rails-3-to-work/194616 "2010-09-08T02:25:01Z")

</div>

i can’t seem to get rails 3 to work on my linux system, i have built ruby 1.9.2-p0 from source, and i have seeing some issues when I type ‘bundle install’, i get the following error? Could not locate Gemfile rake i…

---

## [Problem when : ruby script/server](https://www.ruby-forum.com/t/problem-when-ruby-script-server/194549)

<div class="topic-metadata">

**Author:** [@laguna53](https://www.ruby-forum.com/u/laguna53)\
**Replies:** 18\
**Last updated:** [September 7, 2010, 11:49pm UTC](https://www.ruby-forum.com/t/problem-when-ruby-script-server/194549 "2010-09-07T23:49:19Z")

</div>

Hi; Now I have tried the following, installed ruby 1.8.7 (2010-08-16) \[i386-mingw32\] rails 2.3.8 when I start the server → ruby script/server, I get the following eeror: C:\\Rails\\demo\>ruby script/server =\> Booting…

---

## [Caching](https://www.ruby-forum.com/t/caching/194606)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 7, 2010, 11:34pm UTC](https://www.ruby-forum.com/t/caching/194606 "2010-09-07T23:34:33Z")

</div>

What is the best way to set up caching when GET parameters are involved? For example I don’t want both /index and /index? tags=example to be cached as index.html. Does that make sense? Thanks, Tom

---

## [Weird stuff: validate\_uniqueness\_of with :scope does not work](https://www.ruby-forum.com/t/weird-stuff-validate-uniqueness-of-with-scope-does-not-work/194577)

<div class="topic-metadata">

**Author:** [@Swartz](https://www.ruby-forum.com/u/Swartz)\
**Replies:** 8\
**Last updated:** [September 7, 2010, 11:32pm UTC](https://www.ruby-forum.com/t/weird-stuff-validate-uniqueness-of-with-scope-does-not-work/194577 "2010-09-07T23:32:55Z")

</div>

Running rails 2.3.8. I have a two models defined like this class Member has\_many :folders before\_save: create\_default\_folders protected def create\_default\_folders! %w{Inbox Sent}.each do |folder| unless self.fold…

---

## [Help on formatting some HAML](https://www.ruby-forum.com/t/help-on-formatting-some-haml/194609)

<div class="topic-metadata">

**Author:** [@hazmatt](https://www.ruby-forum.com/u/hazmatt)\
**Replies:** 2\
**Last updated:** [September 7, 2010, 10:43pm UTC](https://www.ruby-forum.com/t/help-on-formatting-some-haml/194609 "2010-09-07T22:43:01Z")

</div>

I wondered if anyone could help me with turning the following in ERB into HAML. I’m VERY new with HAML: \<%= link\_to "New Order", new\_order\_path, :remote =\> true %\> Today's Activity \<% @or…

---

## [\[JOBS\] HelloExpert.com is looking for technology leaders (Dir/VP level hires)](https://www.ruby-forum.com/t/jobs-helloexpert-com-is-looking-for-technology-leaders-dir-vp-level-hires/194607)

<div class="topic-metadata">

**Author:** [@iBloom](https://www.ruby-forum.com/u/iBloom)\
**Replies:** 0\
**Last updated:** [September 7, 2010, 10:12pm UTC](https://www.ruby-forum.com/t/jobs-helloexpert-com-is-looking-for-technology-leaders-dir-vp-level-hires/194607 "2010-09-07T22:12:43Z")

</div>

HelloExpert.com provides free and personalized expert solutions anytime anywhere. The platform uses latest web 2.0, search engine, unified communication technologies to present a unique social-business concept to prof…

---

## [How do you configure WEBrick to use SSL in Rails 3?](https://www.ruby-forum.com/t/how-do-you-configure-webrick-to-use-ssl-in-rails-3/194595)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 1\
**Last updated:** [September 7, 2010, 9:42pm UTC](https://www.ruby-forum.com/t/how-do-you-configure-webrick-to-use-ssl-in-rails-3/194595 "2010-09-07T21:42:52Z")

</div>

Prior to Rails 3, you could modify the script/server file to add in SSL parameters and tell the server command to use the HTTPS version of webrick, now that all of those scripts are gone, does anyone know how to get t…

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=557)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=559)
