# Rails

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

[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:** 543

---

## [No such file to load --initializer](https://www.ruby-forum.com/t/no-such-file-to-load-initializer/195800)

<div class="topic-metadata">

**Author:** [@apaeffgen](https://www.ruby-forum.com/u/apaeffgen)\
**Replies:** 0\
**Last updated:** [September 30, 2010, 10:12am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-initializer/195800 "2010-09-30T10:12:04Z")

</div>

Hi all, issuing the command “$rake gems” in a rails-application folder leads to the error “no such file to load – initializer” I am on centos5.2, ruby 1.9.2.p0, rubygems 1.3.7, rails 3.0 irb → require ‘rubygems’ =\> f…

---

## [Rails3 routes](https://www.ruby-forum.com/t/rails3-routes/195797)

<div class="topic-metadata">

**Author:** [@bingo](https://www.ruby-forum.com/u/bingo)\
**Replies:** 0\
**Last updated:** [September 30, 2010, 10:12am UTC](https://www.ruby-forum.com/t/rails3-routes/195797 "2010-09-30T10:12:04Z")

</div>

I’m migrating my app from Rails 2.3.8 to Rails 3.0.0 . But I’ve problems in converting my routes.rb which looks like this: ActionController::Routing::Routes.draw do |map| map.namespace(:admin) do |admin| admin.resour…

---

## [How to download Prawn pdf while using form submit?](https://www.ruby-forum.com/t/how-to-download-prawn-pdf-while-using-form-submit/195794)

<div class="topic-metadata">

**Author:** [@zealmurugan](https://www.ruby-forum.com/u/zealmurugan)\
**Replies:** 0\
**Last updated:** [September 30, 2010, 10:01am UTC](https://www.ruby-forum.com/t/how-to-download-prawn-pdf-while-using-form-submit/195794 "2010-09-30T10:01:51Z")

</div>

submit.pdf.prawn files pdf.text “successfully submitted” form controller file def index @forms = Form.all respond\_to do |format| format.html end end def submit respond\_to do |format| format.pdf {render } end …

---

## [Railroad problem with :through?](https://www.ruby-forum.com/t/railroad-problem-with-through/195741)

<div class="topic-metadata">

**Author:** [@sempti](https://www.ruby-forum.com/u/sempti)\
**Replies:** 2\
**Last updated:** [September 30, 2010, 9:42am UTC](https://www.ruby-forum.com/t/railroad-problem-with-through/195741 "2010-09-30T09:42:40Z")

</div>

I have the following model layout: class List \< ActiveRecord::Base has\_many :subscribers, :through =\> :list\_subscribers has\_many :list\_subscribers end class Subscriber \< ActiveRecord::Base has\_many :lists has\_many…

---

## [Rails 3 / ActiveModel for Credit Card information?](https://www.ruby-forum.com/t/rails-3-activemodel-for-credit-card-information/193229)

<div class="topic-metadata">

**Author:** [@tnyplz](https://www.ruby-forum.com/u/tnyplz)\
**Replies:** 2\
**Last updated:** [September 30, 2010, 6:24am UTC](https://www.ruby-forum.com/t/rails-3-activemodel-for-credit-card-information/193229 "2010-09-30T06:24:54Z")

</div>

When submitting billing information in the past I’ve always used attr\_accessor for credit card details as they should not be saved in the database. In addition I always end up storing the card expiration date so tha…

---

## [Problem with using oracle on Snow Leopard](https://www.ruby-forum.com/t/problem-with-using-oracle-on-snow-leopard/195786)

<div class="topic-metadata">

**Author:** [@pinkman](https://www.ruby-forum.com/u/pinkman)\
**Replies:** 0\
**Last updated:** [September 30, 2010, 3:16am UTC](https://www.ruby-forum.com/t/problem-with-using-oracle-on-snow-leopard/195786 "2010-09-30T03:16:05Z")

</div>

Just today I completely wiped my hard drive and installed snow leopard fresh. I’ve installed several libraries with success so far, but can’t seem to get oracle working with rails. I’ve installed the instant client s…

---

## [Setting up has\_many\_through association between different db](https://www.ruby-forum.com/t/setting-up-has-many-through-association-between-different-db/195772)

<div class="topic-metadata">

**Author:** [@maruthymukund](https://www.ruby-forum.com/u/maruthymukund)\
**Replies:** 1\
**Last updated:** [September 30, 2010, 1:38am UTC](https://www.ruby-forum.com/t/setting-up-has-many-through-association-between-different-db/195772 "2010-09-30T01:38:43Z")

</div>

I am trying to setup a has\_many :through relationship between two models User and CustomerAccount through another join model AccountOwnership (the underlying tables which BELONG to two DIFFERENT DATABASES). Here is th…

---

## [Communication between Rails and Ajax](https://www.ruby-forum.com/t/communication-between-rails-and-ajax/195779)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [September 30, 2010, 12:56am UTC](https://www.ruby-forum.com/t/communication-between-rails-and-ajax/195779 "2010-09-30T00:56:19Z")

</div>

Hey all, I’m enduring an intense struggle. It involves when a user selects an option from dropdown menu, it filters the fields. However, when I try it, nothing happens. I would like to achieve this without any rails o…

---

## [Render pdf file with errors: Invaild Char etc](https://www.ruby-forum.com/t/render-pdf-file-with-errors-invaild-char-etc/195777)

<div class="topic-metadata">

**Author:** [@joeyweijiang](https://www.ruby-forum.com/u/joeyweijiang)\
**Replies:** 0\
**Last updated:** [September 30, 2010, 12:54am UTC](https://www.ruby-forum.com/t/render-pdf-file-with-errors-invaild-char-etc/195777 "2010-09-30T00:54:39Z")

</div>

Hello G.s, I write some codes to render a pdf file into a view page. For some pfd file, they works fine, while others files got different errors. The errors are like: Invalid char \`\\XXX' in expression, OR unexpexted…

---

## [Autotest or alternative for Rails 3?](https://www.ruby-forum.com/t/autotest-or-alternative-for-rails-3/195763)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 2\
**Last updated:** [September 30, 2010, 12:04am UTC](https://www.ruby-forum.com/t/autotest-or-alternative-for-rails-3/195763 "2010-09-30T00:04:57Z")

</div>

Hey people, I normally used autotest to when writing test which worked just fine until I switched to Rails 3. Now, when I run autotest it tests all tests and gets stuck somewhere: Loaded suite -e Started …EE…EEE…E……

---

## [Rake db:create failure](https://www.ruby-forum.com/t/rake-db-create-failure/195776)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 11:55pm UTC](https://www.ruby-forum.com/t/rake-db-create-failure/195776 "2010-09-29T23:55:43Z")

</div>

Couldn’t create database for {“reconnect”=\>false, “encoding”=\>“utf8”, “username”=\>“root”, “adapter”=\>“mysql”, “database”=\>“app\_production”, “pool”=\>5, “password”=\>“pp”, “socket”=\>"/var/run/mysqld/mysqld.sock"}, charse…

---

## [Implementing a News Feed / Activity Feed on Several Models - Recommendations?](https://www.ruby-forum.com/t/implementing-a-news-feed-activity-feed-on-several-models-recommendations/195684)

<div class="topic-metadata">

**Author:** [@nobosh](https://www.ruby-forum.com/u/nobosh)\
**Replies:** 4\
**Last updated:** [September 29, 2010, 11:13pm UTC](https://www.ruby-forum.com/t/implementing-a-news-feed-activity-feed-on-several-models-recommendations/195684 "2010-09-29T23:13:33Z")

</div>

Hello, I’m interested in learning how to implement a News Feed / Activity Feed on a web app for multiple models like Books, Authors, Comments, etc… Any recommendations from the group? Gems/Plugins, or experience pers…

---

## [Cron job in single environment](https://www.ruby-forum.com/t/cron-job-in-single-environment/195774)

<div class="topic-metadata">

**Author:** [@jhaagmans](https://www.ruby-forum.com/u/jhaagmans)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 11:00pm UTC](https://www.ruby-forum.com/t/cron-job-in-single-environment/195774 "2010-09-29T23:00:06Z")

</div>

Hi, We have an app running that imports near realtime values from a feed. We did that using BackgroundRb, but I was pointed at the fact that BackgroundRb has quite the memory footprint. So I switched to a rake task u…

---

## [Extract all routes and test their views?](https://www.ruby-forum.com/t/extract-all-routes-and-test-their-views/195119)

<div class="topic-metadata">

**Author:** [@zoran](https://www.ruby-forum.com/u/zoran)\
**Replies:** 5\
**Last updated:** [September 29, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/extract-all-routes-and-test-their-views/195119 "2010-09-29T22:15:19Z")

</div>

Hey, I’m trying to add some more tests to my application and was wondering what’s the best way to test all my routes/views of my application. I’m using HAML which can lead to some typos since I’m new to it and of cou…

---

## [Repeated Race Conditions in Rails 3.0](https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [September 29, 2010, 9:47pm UTC](https://www.ruby-forum.com/t/repeated-race-conditions-in-rails-3-0/195764 "2010-09-29T21:47:30Z")

</div>

I’m using “rails s” to test. I have a simple search controller, with an index method that I call with different parameters that let me drill down in a result set. I have a link\_to that is calling the exact same searc…

---

## [How to get rails 3 to respons with js?](https://www.ruby-forum.com/t/how-to-get-rails-3-to-respons-with-js/195761)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 7:40pm UTC](https://www.ruby-forum.com/t/how-to-get-rails-3-to-respons-with-js/195761 "2010-09-29T19:40:19Z")

</div>

Hi All, Does anyone have experience with rails 3 refusing to return js (or some other format) in controller actions that are designed to return both html and some other format? I have the following code: respond\_to :…

---

## [Validates\_acceptance\_of with virtual attribute check box](https://www.ruby-forum.com/t/validates-acceptance-of-with-virtual-attribute-check-box/195759)

<div class="topic-metadata">

**Author:** [@khagimoto](https://www.ruby-forum.com/u/khagimoto)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 7:19pm UTC](https://www.ruby-forum.com/t/validates-acceptance-of-with-virtual-attribute-check-box/195759 "2010-09-29T19:19:57Z")

</div>

I’ve scoured the web for solution, but I can’t figure out why this is not working! I have a terms and conditions check box that user has to check in order to register with a site, but it seems to just let user regist…

---

## [Rails 3 and dynamic css (rcss)](https://www.ruby-forum.com/t/rails-3-and-dynamic-css-rcss/195755)

<div class="topic-metadata">

**Author:** [@levans](https://www.ruby-forum.com/u/levans)\
**Replies:** 2\
**Last updated:** [September 29, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/rails-3-and-dynamic-css-rcss/195755 "2010-09-29T18:59:17Z")

</div>

.rcss files in public/stylesheets do not get rendered to .css files using Rails 3.0.0. What am I missing or doing wrong? Lori

---

## [Has many - Active Record](https://www.ruby-forum.com/t/has-many-active-record/195752)

<div class="topic-metadata">

**Author:** [@andersonleite](https://www.ruby-forum.com/u/andersonleite)\
**Replies:** 2\
**Last updated:** [September 29, 2010, 5:49pm UTC](https://www.ruby-forum.com/t/has-many-active-record/195752 "2010-09-29T17:49:12Z")

</div>

I would like to know which “has\_many” associations my ActiveRecord model has. Example, given this model: class Post \< ActiveRecord::Base has\_many :comments end I need a method that does this: @associations = Pos…

---

## [If/else in index.rss.builder](https://www.ruby-forum.com/t/if-else-in-index-rss-builder/195758)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/if-else-in-index-rss-builder/195758 "2010-09-29T17:46:17Z")

</div>

Hi. I’m new to Rails. It’s my first post here. So I have an index.rss.builder (http://gist.github.com/602773) On line 10 I want to check for an excerpt before showing: post.excerpt + ‘ \*\*\* ’ + I know how to do if/els…

---

## [ROR Development Project](https://www.ruby-forum.com/t/ror-development-project/195757)

<div class="topic-metadata">

**Author:** [@Erica](https://www.ruby-forum.com/u/Erica)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 5:40pm UTC](https://www.ruby-forum.com/t/ror-development-project/195757 "2010-09-29T17:40:25Z")

</div>

Large Online Media Project!! NYC. Long-term Project Foot-in-Door - Large Financial Media Pay - $$High Pay$$ Mulitple Openings Ruby on Rails Developer Join a fast moving team in the development of our next generatio…

---

## [Method used yet not defined anywhere?!](https://www.ruby-forum.com/t/method-used-yet-not-defined-anywhere/195748)

<div class="topic-metadata">

**Author:** [@trulyruby](https://www.ruby-forum.com/u/trulyruby)\
**Replies:** 2\
**Last updated:** [September 29, 2010, 3:51pm UTC](https://www.ruby-forum.com/t/method-used-yet-not-defined-anywhere/195748 "2010-09-29T15:51:56Z")

</div>

Hi all, I’m working on an application that I never developed and have come across a method that does not seem to be defined anywhere yet is working within the code. Yet in script console I get an error saying the met…

---

## [Best image upload plugin?](https://www.ruby-forum.com/t/best-image-upload-plugin/195730)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 4\
**Last updated:** [September 29, 2010, 2:44pm UTC](https://www.ruby-forum.com/t/best-image-upload-plugin/195730 "2010-09-29T14:44:48Z")

</div>

Hey everyone, I’ve been dealing with Rails 3, Paperclip and Windows 7 for a few nights now and don’t feel like I’m actually getting anywhere. I’ve hit config issue after config issue and it’s a bit of a nightmare. Can…

---

## [Acts\_as\_taggable\_on - custom\_contexts not working](https://www.ruby-forum.com/t/acts-as-taggable-on-custom-contexts-not-working/195738)

<div class="topic-metadata">

**Author:** [@rtdp](https://www.ruby-forum.com/u/rtdp)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 1:08pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-on-custom-contexts-not-working/195738 "2010-09-29T13:08:12Z")

</div>

Hello, For my rails application i have declared questions model as acts\_as\_taggable\_on. For this i am using dynamic context tagging. For me Question.custom\_contexts which is expected to give list of contexts doesn’t …

---

## [MissingSourceFile - how to debug?](https://www.ruby-forum.com/t/missingsourcefile-how-to-debug/195737)

<div class="topic-metadata">

**Author:** [@trulyruby](https://www.ruby-forum.com/u/trulyruby)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 11:11am UTC](https://www.ruby-forum.com/t/missingsourcefile-how-to-debug/195737 "2010-09-29T11:11:26Z")

</div>

Hi all - a search for this kind of problem only brought back results for specific solutions to the gem or library in question. I’m getting the following error appear at certai times, like when trying to refresh my gem…

---

## [Rails Developer Glasgow](https://www.ruby-forum.com/t/rails-developer-glasgow/195735)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 0\
**Last updated:** [September 29, 2010, 10:59am UTC](https://www.ruby-forum.com/t/rails-developer-glasgow/195735 "2010-09-29T10:59:59Z")

</div>

Hi we are looking for a senior level Rails developer on a 3 month contract basis required for a top end project. This is not an recruitment agency post. Required: 3-5 years commerical experience. Highly experienced …

---

## [Run 'rails console' no problem, but not 'rails dbconsole': Couldn't find database client: psql](https://www.ruby-forum.com/t/run-rails-console-no-problem-but-not-rails-dbconsole-couldnt-find-database-client-psql/195719)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 9:30am UTC](https://www.ruby-forum.com/t/run-rails-console-no-problem-but-not-rails-dbconsole-couldnt-find-database-client-psql/195719 "2010-09-29T09:30:27Z")

</div>

It’s one of those things that seems like it should work but does not. My rails app (and ‘rails console’) clearly knows where my data is as I can see my data. When I run ‘rails dbconsole’ I can not get in, I get this …

---

## [Capistrano](https://www.ruby-forum.com/t/capistrano/195313)

<div class="topic-metadata">

**Author:** [@rubyginner](https://www.ruby-forum.com/u/rubyginner)\
**Replies:** 7\
**Last updated:** [September 29, 2010, 5:45am UTC](https://www.ruby-forum.com/t/capistrano/195313 "2010-09-29T05:45:07Z")

</div>

Hi, I’ve seen Capistrano mentioned so googled it. I get capify.org, click on it and get: Index of / cgi-bin/ http://www.capify.org/cgi-bin/ rdoc/ http://www.capify.org/rdoc/ ri/ http://www.capify.org/ri/ wiki/ h…

---

## [How to limit map.resource](https://www.ruby-forum.com/t/how-to-limit-map-resource/195724)

<div class="topic-metadata">

**Author:** [@lambda](https://www.ruby-forum.com/u/lambda)\
**Replies:** 1\
**Last updated:** [September 29, 2010, 5:13am UTC](https://www.ruby-forum.com/t/how-to-limit-map-resource/195724 "2010-09-29T05:13:43Z")

</div>

Hi, I am adding a new action in UsersController, the name is “drag\_demo”. But when I visit “http://localhost:3000/users/drag\_demo”, it show up the error “Couldn’t find User with ID=drag\_demo” I checked the routes. I…

---

## [Using database constraints](https://www.ruby-forum.com/t/using-database-constraints/195695)

<div class="topic-metadata">

**Author:** [@msan](https://www.ruby-forum.com/u/msan)\
**Replies:** 3\
**Last updated:** [September 29, 2010, 4:18am UTC](https://www.ruby-forum.com/t/using-database-constraints/195695 "2010-09-29T04:18:26Z")

</div>

Do you think it’s necessary to use database constraints like foreign keys or it is safe to use only rails constraints like has\_many and so on.

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

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