# Rails

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

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

---

## [How to maintain Form State between Postback?](https://www.ruby-forum.com/t/how-to-maintain-form-state-between-postback/117046)

<div class="topic-metadata">

**Author:** [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Replies:** 13\
**Last updated:** [October 13, 2007, 10:14am UTC](https://www.ruby-forum.com/t/how-to-maintain-form-state-between-postback/117046 "2007-10-13T10:14:18Z")

</div>

Hi all, I’ve trying to look for answers for my problem but so far couldn’t find one, hopefully you can tell me what to do. This problem is so ubiquitous to Web D., pertaining the fact that the web is stateless, i.e. …

---

## [Rails on mobile](https://www.ruby-forum.com/t/rails-on-mobile/117122)

<div class="topic-metadata">

**Author:** [@warlock\_handler](https://www.ruby-forum.com/u/warlock_handler)\
**Replies:** 4\
**Last updated:** [October 13, 2007, 9:37am UTC](https://www.ruby-forum.com/t/rails-on-mobile/117122 "2007-10-13T09:37:19Z")

</div>

Hi guys, I have just started coding in rails… wanted to know if I could code an application for a mobile device in RAILS…

---

## [Pre-processing for every page](https://www.ruby-forum.com/t/pre-processing-for-every-page/117119)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [October 13, 2007, 7:05am UTC](https://www.ruby-forum.com/t/pre-processing-for-every-page/117119 "2007-10-13T07:05:38Z")

</div>

In my own app framework I’ve used for some time now, I am accustomed to having code which is processed for every page request prior to the page/request-specific code. In Rails, I’m still fguring out the flow of execut…

---

## [Installing Rails on CentOS 5](https://www.ruby-forum.com/t/installing-rails-on-centos-5/117014)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [October 13, 2007, 4:45am UTC](https://www.ruby-forum.com/t/installing-rails-on-centos-5/117014 "2007-10-13T04:45:59Z")

</div>

I’m running CentOS 5. So far I’ve downloaded tarballs, ruby-1.8.6.tar.gz and rubygems-0.9.4.tgz. I seemed to have successfully installed ruby, and maybe rubygems I went into rubygems-0.9.4 directory, and typed: rub…

---

## [Undefined local variable or method](https://www.ruby-forum.com/t/undefined-local-variable-or-method/116994)

<div class="topic-metadata">

**Author:** [@hallikpapa](https://www.ruby-forum.com/u/hallikpapa)\
**Replies:** 11\
**Last updated:** [October 13, 2007, 12:01am UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method/116994 "2007-10-13T00:01:08Z")

</div>

I am very new to ruby, and trying to get auto complete / predictive text working, but I am getting the error "undefined local variable or method \`providers’ " Here is the first box in my view \<label for=""\>Provider:\</…

---

## [OS/GPL eCommerce/ShopFramework for RoR?](https://www.ruby-forum.com/t/os-gpl-ecommerce-shopframework-for-ror/117099)

<div class="topic-metadata">

**Author:** [@Knut\_SRoR\_beginner](https://www.ruby-forum.com/u/Knut_SRoR_beginner)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/os-gpl-ecommerce-shopframework-for-ror/117099 "2007-10-12T23:59:23Z")

</div>

Hi, did someone knows a Shop or eCommerce Framework for RoR which is available under GPL license or an additional CMS framework which can be use for such an approach (I need such a framework for my master thesis). I…

---

## [How to move a file from one folder to another folder](https://www.ruby-forum.com/t/how-to-move-a-file-from-one-folder-to-another-folder/117052)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 1\
**Last updated:** [October 12, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/how-to-move-a-file-from-one-folder-to-another-folder/117052 "2007-10-12T23:37:09Z")

</div>

Hi all, I want to move the file from one folder to another folder, but i don;t which command to use it, please let me know, if anybody knows my present coding is, Dir\["#{dirname}//"\].each do | thisfile | thisfile.gs…

---

## [Test not rolling back](https://www.ruby-forum.com/t/test-not-rolling-back/116627)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 3\
**Last updated:** [October 12, 2007, 11:28pm UTC](https://www.ruby-forum.com/t/test-not-rolling-back/116627 "2007-10-12T23:28:23Z")

</div>

For testing, I use: self.use\_transactional\_fixtures = true This should cause a ROLLBACK for each test case. If I run a single file, foo\_controller\_test.rb, it works as expected. I see BEGIN and ROLLBACK 8 times in t…

---

## [:message](https://www.ruby-forum.com/t/message/117095)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [October 12, 2007, 10:48pm UTC](https://www.ruby-forum.com/t/message/117095 "2007-10-12T22:48:03Z")

</div>

When using the :message symbol in a validation check in one of my models, how do you get that message back to the view to be displayed? For exmaple: validates\_uniqueness\_of :card\_num, :scope =\> \[:issuing\_company, :us…

---

## [Acts\_as\_tree without database](https://www.ruby-forum.com/t/acts-as-tree-without-database/117080)

<div class="topic-metadata">

**Author:** [@wogri](https://www.ruby-forum.com/u/wogri)\
**Replies:** 4\
**Last updated:** [October 12, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/acts-as-tree-without-database/117080 "2007-10-12T22:24:04Z")

</div>

Hi, I’m currently developing a web-application that is multilingual. I’m using ruby+gettext for the multilingual facility. Now I’d like to create a category view that acts\_as\_tree, but with multilingual :name- values…

---

## [How Can I Initialize Routes Outside of Rails Boot?](https://www.ruby-forum.com/t/how-can-i-initialize-routes-outside-of-rails-boot/117091)

<div class="topic-metadata">

**Author:** [@sbellware](https://www.ruby-forum.com/u/sbellware)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/how-can-i-initialize-routes-outside-of-rails-boot/117091 "2007-10-12T21:16:13Z")

</div>

I’d like to use my application’s named routes in Watir tests. The Watir tests are in the source tree with the Rails app. Is there a way to initialize the routes so that I can use them in the Watir test code? Thanks, …

---

## [Best way to client-side load or hide state/province drop down when country is changed?](https://www.ruby-forum.com/t/best-way-to-client-side-load-or-hide-state-province-drop-down-when-country-is-changed/116822)

<div class="topic-metadata">

**Author:** [@Yuval](https://www.ruby-forum.com/u/Yuval)\
**Replies:** 5\
**Last updated:** [October 12, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/best-way-to-client-side-load-or-hide-state-province-drop-down-when-country-is-changed/116822 "2007-10-12T21:13:53Z")

</div>

Maybe I’m just trying too hard, because I have done this plenty of times with plain old javascript before Rails entered my life. But now that I’m trying to work within the Rails system of form\_for and such, I am findi…

---

## [Why does Rails do this?](https://www.ruby-forum.com/t/why-does-rails-do-this/117087)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/why-does-rails-do-this/117087 "2007-10-12T20:55:33Z")

</div>

i was trying to run tests for the sentry plugin and they failed when using fixtures activerecord’s fixtures.rb reads: def setup\_with\_fixtures return unless defined?(ActiveRecord::Base) && !ActiveRecord::Base.co…

---

## [\[ANN\] Rails 1.2.5: Security and maintenance release](https://www.ruby-forum.com/t/ann-rails-1-2-5-security-and-maintenance-release/117076)

<div class="topic-metadata">

**Author:** [@DHH](https://www.ruby-forum.com/u/DHH)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 8:14pm UTC](https://www.ruby-forum.com/t/ann-rails-1-2-5-security-and-maintenance-release/117076 "2007-10-12T20:14:08Z")

</div>

This release closes a JSON XSS vulnerability, fixes a couple of minor regressions introduced in 1.2.4, and backports a handful of features and fixes from the 2.0 preview release. All users of Rails 1.2.4 or earlier ar…

---

## [Redirect foo.com to www.foo.com](https://www.ruby-forum.com/t/redirect-foo-com-to-www-foo-com/115744)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 7\
**Last updated:** [October 12, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/redirect-foo-com-to-www-foo-com/115744 "2007-10-12T19:57:44Z")

</div>

Is there an easy way to redirect foo.com to www.foo.com in nginx? Either that or if somebody knows a way to get restful authentication to store a cookie for either www.foo.com or foo.com that would be great. My curren…

---

## [How RoR works with table created on fly](https://www.ruby-forum.com/t/how-ror-works-with-table-created-on-fly/117060)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 7:31pm UTC](https://www.ruby-forum.com/t/how-ror-works-with-table-created-on-fly/117060 "2007-10-12T19:31:58Z")

</div>

Hi, all I’ve trying to look for answers for my problem but so far couldn’t find one, hopefully someone can tell me what to do. In my application, I have to let user can create new table, and they can add or delete c…

---

## [\[n00b\] How to CONFIGURE port other then 3000?](https://www.ruby-forum.com/t/n00b-how-to-configure-port-other-then-3000/116604)

<div class="topic-metadata">

**Author:** [@olie](https://www.ruby-forum.com/u/olie)\
**Replies:** 8\
**Last updated:** [October 12, 2007, 7:24pm UTC](https://www.ruby-forum.com/t/n00b-how-to-configure-port-other-then-3000/116604 "2007-10-12T19:24:57Z")

</div>

I’ve Googled and checked the archives, but the only answer I can find about firing up on port other than 3000 is to either modify the library default (?!) or use the command-line argument --port=# (eh…) What I’d LIKE …

---

## [Best Database For Rails?](https://www.ruby-forum.com/t/best-database-for-rails/116978)

<div class="topic-metadata">

**Author:** [@grey-lantern](https://www.ruby-forum.com/u/grey-lantern)\
**Replies:** 12\
**Last updated:** [October 12, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/best-database-for-rails/116978 "2007-10-12T18:13:26Z")

</div>

Hello, I was wondering if anyone could tell me which database, if any, is easiest to integrate with Rails? I know most databases can be used with Rails but I was wondering if there is one that is easier to integrate …

---

## [Using XML as model in Rails App](https://www.ruby-forum.com/t/using-xml-as-model-in-rails-app/117073)

<div class="topic-metadata">

**Author:** [@clive](https://www.ruby-forum.com/u/clive)\
**Replies:** 0\
**Last updated:** [October 12, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/using-xml-as-model-in-rails-app/117073 "2007-10-12T18:04:01Z")

</div>

Hi I am aware of the ability of Rails to push out XML from the model. Is it possible to use an XML file as a model itself, i.e. use ActiveRecord to provide something like ORM over an XML resource? I have googled this…

---

## [Client libraries for Ruby/Rails?](https://www.ruby-forum.com/t/client-libraries-for-ruby-rails/117004)

<div class="topic-metadata">

**Author:** [@jeffro](https://www.ruby-forum.com/u/jeffro)\
**Replies:** 3\
**Last updated:** [October 12, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/client-libraries-for-ruby-rails/117004 "2007-10-12T17:57:34Z")

</div>

Hope I’m asking a valid question, but I would like to provide a Ruby/ Rails client library for a web service I’ve created. I’m not a proficient Ruby/Rails developer so I’m not even certain the metaphor of “client lib…

---

## [Has\_many :foreign\_key association fails](https://www.ruby-forum.com/t/has-many-foreign-key-association-fails/117041)

<div class="topic-metadata">

**Author:** [@inriz](https://www.ruby-forum.com/u/inriz)\
**Replies:** 8\
**Last updated:** [October 12, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/has-many-foreign-key-association-fails/117041 "2007-10-12T17:11:54Z")

</div>

hello list, class Advertiser \< ActiveRecord::Base set\_table\_name “INSERENT” set\_primary\_key “INSNR” has\_many :priv\_properties, :class\_name =\> “PrivProperty”, :foreign\_key =\> “MAKNR” end produces wrong sql selelec…

---

## [Whats the right way to avoid this nil error](https://www.ruby-forum.com/t/whats-the-right-way-to-avoid-this-nil-error/117051)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [October 12, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/whats-the-right-way-to-avoid-this-nil-error/117051 "2007-10-12T16:36:07Z")

</div>

I have an model Order and a model Customer. Each customer has\_many Orders. Each Order belongs\_to a Customer. If I create an order but don’t specify a Customer (for whatever reason, maybe it’s unknown at the time)… I o…

---

## [How do you make a variable available to all views?](https://www.ruby-forum.com/t/how-do-you-make-a-variable-available-to-all-views/117036)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 3\
**Last updated:** [October 12, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/how-do-you-make-a-variable-available-to-all-views/117036 "2007-10-12T16:35:31Z")

</div>

Another stupid question: I have a variable that gets inserted into the main layout. Now, it would be silly to go and set it as an instance variable for every single method, right? But when I try to set it in the appli…

---

## [Unique entries](https://www.ruby-forum.com/t/unique-entries/116996)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 5\
**Last updated:** [October 12, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/unique-entries/116996 "2007-10-12T16:24:50Z")

</div>

I have this table associating airlines with rental cars. It has four columns - user\_id, airline\_id, rentalcar\_id and id. I need to make sure that the combo of airline\_id and rentalcar\_id is always unique - in other wo…

---

## [:update to a list](https://www.ruby-forum.com/t/update-to-a-list/116982)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 3\
**Last updated:** [October 12, 2007, 3:37pm UTC](https://www.ruby-forum.com/t/update-to-a-list/116982 "2007-10-12T15:37:03Z")

</div>

I have this list and what I want to do is to have a link that allows the user to add something to this list. So I have a form with the :update option, but I want the update to happen at the end of this div that I have…

---

## [Calling javascript in submit](https://www.ruby-forum.com/t/calling-javascript-in-submit/117038)

<div class="topic-metadata">

**Author:** [@ravikanth](https://www.ruby-forum.com/u/ravikanth)\
**Replies:** 1\
**Last updated:** [October 12, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/calling-javascript-in-submit/117038 "2007-10-12T15:32:09Z")

</div>

Hi, I want to call javascript function which is doing some validation . I want to call this function in onclick of submit button . can anybody help

---

## [How to prevent URL change](https://www.ruby-forum.com/t/how-to-prevent-url-change/116850)

<div class="topic-metadata">

**Author:** [@franck](https://www.ruby-forum.com/u/franck)\
**Replies:** 6\
**Last updated:** [October 12, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/how-to-prevent-url-change/116850 "2007-10-12T15:17:16Z")

</div>

Hi there, I do think this is a simple but when we dont know how, it is not simple at all. I have got a shopping cart and URL to show it is something like …/shop/cart/edit, and in the template cart.rhtml, I have some …

---

## [Database configuration specifies nonexistent postgresql adapter](https://www.ruby-forum.com/t/database-configuration-specifies-nonexistent-postgresql-adapter/117033)

<div class="topic-metadata">

**Author:** [@CCH](https://www.ruby-forum.com/u/CCH)\
**Replies:** 1\
**Last updated:** [October 12, 2007, 3:16pm UTC](https://www.ruby-forum.com/t/database-configuration-specifies-nonexistent-postgresql-adapter/117033 "2007-10-12T15:16:54Z")

</div>

Hi I am trying to get RoR to work with Postgresql 8,2.5 (latest stable version) Steps taken Download Postgresql 1.82 and installed successfully Edited my Database.yml development: adapter: postgresql database: te…

---

## [Button\_to\_function and javascript prompt?](https://www.ruby-forum.com/t/button-to-function-and-javascript-prompt/117003)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 4\
**Last updated:** [October 12, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/button-to-function-and-javascript-prompt/117003 "2007-10-12T15:09:52Z")

</div>

Hello, I want to ask the users specific question using javascript, and then get the answer :slight\_smile: \<%= button\_to\_function “My Test”, “prompt(‘Your name is?’)” %\> How can I accomplish this? I hope someone out …

---

## [How to replace from "\\" to "/"](https://www.ruby-forum.com/t/how-to-replace-from-to/117057)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 2\
**Last updated:** [October 12, 2007, 2:36pm UTC](https://www.ruby-forum.com/t/how-to-replace-from-to/117057 "2007-10-12T14:36:37Z")

</div>

HI all, i want to replace slashes like this, please help me to do this, thanks in advance. From = .\\script…\\config…\\gentran\\test4.txt To = ./script/…/config/…/gentran/test4.txt

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

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