# Rails

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

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

---

## [Javascript not working anymore after page reloard](https://www.ruby-forum.com/t/javascript-not-working-anymore-after-page-reloard/143222)

<div class="topic-metadata">

**Author:** [@mrdamien](https://www.ruby-forum.com/u/mrdamien)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/javascript-not-working-anymore-after-page-reloard/143222 "2008-07-16T16:34:47Z")

</div>

Hi all, I have a part of web page that I reload with an Ajax.Updater. But javascript is observing some objects in there and after the partial reload, the observer are not working anymore. Do you know a trick to solve…

---

## [How to create new database to oracle?](https://www.ruby-forum.com/t/how-to-create-new-database-to-oracle/140179)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 6\
**Last updated:** [July 16, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/how-to-create-new-database-to-oracle/140179 "2008-07-16T15:41:51Z")

</div>

i have rails-2.1.0 my database.yml development: adapter: oracle database: pe username: or password: or rake db:create rake db:version —\>Current version: 0 rake db:migrate rake aborted! ORA-12154: TNS:could n…

---

## [RESTful problems - \_url failed to generate](https://www.ruby-forum.com/t/restful-problems-url-failed-to-generate/143086)

<div class="topic-metadata">

**Author:** [@validkeys](https://www.ruby-forum.com/u/validkeys)\
**Replies:** 5\
**Last updated:** [July 16, 2008, 3:32pm UTC](https://www.ruby-forum.com/t/restful-problems-url-failed-to-generate/143086 "2008-07-16T15:32:27Z")

</div>

Hey guys, I am a noob, so hopefully this problem has an easy solution. I am building a simple shopping cart with products that have product categories. I have set up my routes like the following: map.resources :prod…

---

## [Condition on join table on a has\_many :through isn't created](https://www.ruby-forum.com/t/condition-on-join-table-on-a-has-many-through-isnt-created/143180)

<div class="topic-metadata">

**Author:** [@Pascal\_F](https://www.ruby-forum.com/u/Pascal_F)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/condition-on-join-table-on-a-has-many-through-isnt-created/143180 "2008-07-16T14:54:34Z")

</div>

Hi, i have a Permissions table with rank\_id:integer, group\_id:integer and a key:string a group model and a rank model. The group has\_many “virtual permissions” through the join table. Each permission type is identi…

---

## [Livesearch - what's missing?](https://www.ruby-forum.com/t/livesearch-whats-missing/143187)

<div class="topic-metadata">

**Author:** [@Israel\_G](https://www.ruby-forum.com/u/Israel_G)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 2:39pm UTC](https://www.ruby-forum.com/t/livesearch-whats-missing/143187 "2008-07-16T14:39:34Z")

</div>

Hi! I have this code http://pastie.org/234424and i don’t know what to do next to update the div to show what matches hte text being typed. Can someone help me? Thanks in advance! – Guerra

---

## [In place editing for non-standard values](https://www.ruby-forum.com/t/in-place-editing-for-non-standard-values/143217)

<div class="topic-metadata">

**Author:** [@mojca](https://www.ruby-forum.com/u/mojca)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 2:39pm UTC](https://www.ruby-forum.com/t/in-place-editing-for-non-standard-values/143217 "2008-07-16T14:39:21Z")

</div>

I would like to add in-place editing functionality to my application, but I fetch & store the data from/into a weird source that requires some transformations to be done before displaying & storing the content. A slig…

---

## [Deploy:start issue](https://www.ruby-forum.com/t/deploy-start-issue/143211)

<div class="topic-metadata">

**Author:** [@kobrakai](https://www.ruby-forum.com/u/kobrakai)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 2:22pm UTC](https://www.ruby-forum.com/t/deploy-start-issue/143211 "2008-07-16T14:22:25Z")

</div>

I am trying to deploy my first rails app to a dedicated server (using capistrano). The deployment goes fine (no errors) until the deploy:start step. I get the following error message executing \`deploy:start’ executi…

---

## [Gathering statistics](https://www.ruby-forum.com/t/gathering-statistics/143051)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 6\
**Last updated:** [July 16, 2008, 1:57pm UTC](https://www.ruby-forum.com/t/gathering-statistics/143051 "2008-07-16T13:57:19Z")

</div>

In my production.log file, I’m only seeing errors and database queries, etc. How should I go about generating an access.log and error.log (similar to apache). I’m interested in seeing the usual stats, request, refere…

---

## [Drop down box displaying years](https://www.ruby-forum.com/t/drop-down-box-displaying-years/143123)

<div class="topic-metadata">

**Author:** [@gennosuke](https://www.ruby-forum.com/u/gennosuke)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/drop-down-box-displaying-years/143123 "2008-07-16T13:46:09Z")

</div>

Hi guys, How would I go about creating a drop down box with a listing of years from say 1900 to present? Thanks Larry

---

## [How to maintain migrations?](https://www.ruby-forum.com/t/how-to-maintain-migrations/143174)

<div class="topic-metadata">

**Author:** [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Replies:** 4\
**Last updated:** [July 16, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/how-to-maintain-migrations/143174 "2008-07-16T13:04:11Z")

</div>

Hi everybody, I’m trying to figure out the best way to do migrations. I’m sure it’s a personal preference in some ways, but how do you prefer to maintain migrations? Do you create a new migration every time you think…

---

## [Fetch first 5 elements from array](https://www.ruby-forum.com/t/fetch-first-5-elements-from-array/143193)

<div class="topic-metadata">

**Author:** [@ganana\_srishti](https://www.ruby-forum.com/u/ganana_srishti)\
**Replies:** 4\
**Last updated:** [July 16, 2008, 12:29pm UTC](https://www.ruby-forum.com/t/fetch-first-5-elements-from-array/143193 "2008-07-16T12:29:51Z")

</div>

Hi, Is there any ruby function to fetch first five elements from array for eg:a=\[134,374,878,98,763,47,5669\] i want to get only first five i.e 134,374,878,98,763

---

## [Rails 2.0 script/generate scaffold product admin](https://www.ruby-forum.com/t/rails-2-0-script-generate-scaffold-product-admin/143182)

<div class="topic-metadata">

**Author:** [@jsn1](https://www.ruby-forum.com/u/jsn1)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/rails-2-0-script-generate-scaffold-product-admin/143182 "2008-07-16T12:12:48Z")

</div>

Hi all I am trying the depot application from Agile Web D. With rails, and instead of running: script/generate scaffold product admin In 2.0 I run: script/generate model Product title:string description:string But …

---

## [BackgrounDRb undefined method](https://www.ruby-forum.com/t/backgroundrb-undefined-method/143206)

<div class="topic-metadata">

**Author:** [@miss\_michelle](https://www.ruby-forum.com/u/miss_michelle)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 12:11pm UTC](https://www.ruby-forum.com/t/backgroundrb-undefined-method/143206 "2008-07-16T12:11:38Z")

</div>

I’m using BackgrounDRb and according to the API I should be able to use methods such as delete\_worker() and send\_request(). However when I try to invoke these methods on my workers I get undefined method errors: NoMe…

---

## [How to define default template path in controller](https://www.ruby-forum.com/t/how-to-define-default-template-path-in-controller/142901)

<div class="topic-metadata">

**Author:** [@gsterndale](https://www.ruby-forum.com/u/gsterndale)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 12:08pm UTC](https://www.ruby-forum.com/t/how-to-define-default-template-path-in-controller/142901 "2008-07-16T12:08:07Z")

</div>

StudentsController extendeds my basic RESTful UsersController. Student is a named\_scope in my User model. I’d like the students controller to render templates in app/views/ users/, not app/views/students/. How can I d…

---

## [Rails integration testing](https://www.ruby-forum.com/t/rails-integration-testing/143207)

<div class="topic-metadata">

**Author:** [@Shashank\_Teotia](https://www.ruby-forum.com/u/Shashank_Teotia)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 11:34am UTC](https://www.ruby-forum.com/t/rails-integration-testing/143207 "2008-07-16T11:34:43Z")

</div>

I need to know which library to use for integration testing. I am currently exploring Rspec on Rails for writing unit tests and now I need something for integration testing. I guess I could use Story Runner but guess …

---

## [Rcov code coverage tool](https://www.ruby-forum.com/t/rcov-code-coverage-tool/143203)

<div class="topic-metadata">

**Author:** [@rutuja](https://www.ruby-forum.com/u/rutuja)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 9:46am UTC](https://www.ruby-forum.com/t/rcov-code-coverage-tool/143203 "2008-07-16T09:46:36Z")

</div>

Hi, Iam trying to use rcov for code coverage analysis of our project , I have the latest version of rcov, but I am unable to put it use in my project, Can some please guide me over how to use this tool. And also is …

---

## [Indexing on string URLs. How efficient?](https://www.ruby-forum.com/t/indexing-on-string-urls-how-efficient/143201)

<div class="topic-metadata">

**Author:** [@arpit](https://www.ruby-forum.com/u/arpit)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 8:57am UTC](https://www.ruby-forum.com/t/indexing-on-string-urls-how-efficient/143201 "2008-07-16T08:57:44Z")

</div>

What is the best way to store permalinks/slugs when you have the parent-child model like Radiant? In radiant each page can have many child pages and each page has slug which is unique in the scope of parent. Now, ev…

---

## [Model validation outside of the model](https://www.ruby-forum.com/t/model-validation-outside-of-the-model/143143)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 8:16am UTC](https://www.ruby-forum.com/t/model-validation-outside-of-the-model/143143 "2008-07-16T08:16:46Z")

</div>

Hi, having trouble validating my form: \_form.html.erb: \<% form\_remote\_for :user, @user, :url =\> { :action =\> “create” } do |f| %\> Email: \<%= f.text\_field :email %\> \<tr\> \<td class="text"\>Pass…

---

## [Table columns are not being recognized (empty table)](https://www.ruby-forum.com/t/table-columns-are-not-being-recognized-empty-table/143200)

<div class="topic-metadata">

**Author:** [@LLL](https://www.ruby-forum.com/u/LLL)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 8:15am UTC](https://www.ruby-forum.com/t/table-columns-are-not-being-recognized-empty-table/143200 "2008-07-16T08:15:01Z")

</div>

Upon viewing one of my tables in the MySQL Query Browser, I found out that it was “empty”, and the columns are not being recognized. (And I’ve ran rake:db migrate). Why aren’t the columns showing up? I posted a quest…

---

## [Db implementation question](https://www.ruby-forum.com/t/db-implementation-question/143197)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 7:15am UTC](https://www.ruby-forum.com/t/db-implementation-question/143197 "2008-07-16T07:15:16Z")

</div>

Hi This is a database implementation question…I am currently using mydbname\_development mydbname\_test mydbname\_production in database.yml file…So now my requirement is suppose two (for example) companies use my app…

---

## [Belongs\_to causing endless loop on first call to save!](https://www.ruby-forum.com/t/belongs-to-causing-endless-loop-on-first-call-to-save/143181)

<div class="topic-metadata">

**Author:** [@Ryan\_Frith](https://www.ruby-forum.com/u/Ryan_Frith)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 7:08am UTC](https://www.ruby-forum.com/t/belongs-to-causing-endless-loop-on-first-call-to-save/143181 "2008-07-16T07:08:56Z")

</div>

Hi, I have a situation I’m hoping someone out there may be able to shed some light on. I have a Rails app (2.1.0 on Ruby 1.8.7) with a wizard-based sign up process, that has recently been changed from storing increm…

---

## [Rails 2.1.0 and tzinfo plugin](https://www.ruby-forum.com/t/rails-2-1-0-and-tzinfo-plugin/143185)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 4:37am UTC](https://www.ruby-forum.com/t/rails-2-1-0-and-tzinfo-plugin/143185 "2008-07-16T04:37:02Z")

</div>

I am upgrading a Rails 1.2.6 app to Rails 2.1.0 that had used tzinfo gem to manage time zones. Time zone support is built into Rails 2.1.0 and is based on the tzinfo gem. However, it is slightly different (I do not …

---

## [Help Deploying with Capistrano](https://www.ruby-forum.com/t/help-deploying-with-capistrano/143149)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 6\
**Last updated:** [July 16, 2008, 4:23am UTC](https://www.ruby-forum.com/t/help-deploying-with-capistrano/143149 "2008-07-16T04:23:59Z")

</div>

I’m attempting to deploy an application using Capistrano. I’ve successfully “capified” and have edited the deploy.rb file. However, when I run either “rake remote:setup” or “rake remote:exec ACTION = setup” I get an…

---

## [Reloading a div with a changed session variable](https://www.ruby-forum.com/t/reloading-a-div-with-a-changed-session-variable/104500)

<div class="topic-metadata">

**Author:** [@d2kagw](https://www.ruby-forum.com/u/d2kagw)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 3:00am UTC](https://www.ruby-forum.com/t/reloading-a-div-with-a-changed-session-variable/104500 "2008-07-16T03:00:20Z")

</div>

New to this, so bear with me. Controller: def show @client = Client.find\_by\_permalink(params\[:permalink\]) @images = ClientImage.find\_all\_by\_client\_id(@client, :order =\> “id ASC”) session\[:client\] = @client if sess…

---

## [Filtering and sorting](https://www.ruby-forum.com/t/filtering-and-sorting/143184)

<div class="topic-metadata">

**Author:** [@Blakes](https://www.ruby-forum.com/u/Blakes)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 2:43am UTC](https://www.ruby-forum.com/t/filtering-and-sorting/143184 "2008-07-16T02:43:21Z")

</div>

Hi all, I am still kind of new to the Ruby scene, and have run into a bit of a snag that I have been wrestling with all day. I have a Table that has a form that you use to filter information, and then renders the pa…

---

## [Sqlite3](https://www.ruby-forum.com/t/sqlite3/141422)

<div class="topic-metadata">

**Author:** [@liamr](https://www.ruby-forum.com/u/liamr)\
**Replies:** 11\
**Last updated:** [July 16, 2008, 2:08am UTC](https://www.ruby-forum.com/t/sqlite3/141422 "2008-07-16T02:08:51Z")

</div>

If I install sqlite3-ruby using gem, I get this error… LoadError: no such file to load – sqlite3/database I saw this post… "no such file to load -- sqlite3" Rails - Rails - Ruby-Forum And it seems that this is most …

---

## [Active record find placeholders and types](https://www.ruby-forum.com/t/active-record-find-placeholders-and-types/143179)

<div class="topic-metadata">

**Author:** [@ppjunty](https://www.ruby-forum.com/u/ppjunty)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 1:56am UTC](https://www.ruby-forum.com/t/active-record-find-placeholders-and-types/143179 "2008-07-16T01:56:09Z")

</div>

the params hash can be used to replace placeholders in find conditions, like: Product.find conditions =\> \[“type\_id = :type\_id”, params\] this will generate the sql statement: … WHERE type\_id = ‘1’… (with apostrophes) …

---

## [ActiveResource problem with get req](https://www.ruby-forum.com/t/activeresource-problem-with-get-req/142916)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 12:56am UTC](https://www.ruby-forum.com/t/activeresource-problem-with-get-req/142916 "2008-07-16T00:56:18Z")

</div>

since i can not find any documentation on this stuff that helps any i’m taking a stab at doing this… @gapiTranslate = ActiveResource::Connection.new("http:// translate.google.com", ActiveResource::Formats\[:json\]) @ga…

---

## [Visual effects with observe\_field](https://www.ruby-forum.com/t/visual-effects-with-observe-field/143177)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 12:51am UTC](https://www.ruby-forum.com/t/visual-effects-with-observe-field/143177 "2008-07-16T00:51:58Z")

</div>

\<%= observe\_field ‘search\_form’, :frequency =\> 0.5, :update =\> ‘results’, :url =\> { :controller =\> ‘users’, :action =\> ‘get\_results’ }, :loading =\> “Element.show(‘indicator\_gif\_id’)”, :complete =\> “Element.hide(‘ind…

---

## [Admin.root doesnt work anymore (2.1.0)](https://www.ruby-forum.com/t/admin-root-doesnt-work-anymore-2-1-0/143159)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 12:35am UTC](https://www.ruby-forum.com/t/admin-root-doesnt-work-anymore-2-1-0/143159 "2008-07-16T00:35:14Z")

</div>

Hello, I’m just trying to set up a admin panel like always so I added this to my routes.rb: map.namespace :admin do |admin| admin.root :controller =\> “products” end But 2.1.0 doesnt seem to like it. It throws an ex…

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

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