# Rails

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

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

---

## [This code doesn't work in production](https://www.ruby-forum.com/t/this-code-doesnt-work-in-production/225960)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 4\
**Last updated:** [August 18, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/this-code-doesnt-work-in-production/225960 "2007-08-18T13:41:21Z")

</div>

The code below works in my development server on my home computer. However, the code breaks with a ‘Internet minimum invalid’ validation error when deploy to production server. What could the problem be? HOw might I t…

---

## [Frustrations with routing](https://www.ruby-forum.com/t/frustrations-with-routing/112364)

<div class="topic-metadata">

**Author:** [@cidol](https://www.ruby-forum.com/u/cidol)\
**Replies:** 4\
**Last updated:** [August 18, 2007, 12:52pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364 "2007-08-18T12:52:46Z")

</div>

Lets say I’ve got this mapped out map.resources :owners do |owners| owners.resources :possessions This gives me routes looking like this: …/owners/:id/ …/owners/:owner\_id/possessions/:id/ I’m very frustrated that t…

---

## [Subversion & multiple developers how to manage files?](https://www.ruby-forum.com/t/subversion-multiple-developers-how-to-manage-files/112342)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 3\
**Last updated:** [August 18, 2007, 11:56am UTC](https://www.ruby-forum.com/t/subversion-multiple-developers-how-to-manage-files/112342 "2007-08-18T11:56:40Z")

</div>

Hi We are using eclipse as a common IDE for developing a rails project using radrails. Developers work on a number of differing OS’s, win xp Pro, win xp pro x64, unix (various flavours). On one unix system we have …

---

## [Conditional page caching](https://www.ruby-forum.com/t/conditional-page-caching/112057)

<div class="topic-metadata">

**Author:** [@teesea](https://www.ruby-forum.com/u/teesea)\
**Replies:** 3\
**Last updated:** [August 18, 2007, 11:01am UTC](https://www.ruby-forum.com/t/conditional-page-caching/112057 "2007-08-18T11:01:34Z")

</div>

I want to be able to cache a page only when a user is not logged in, I’ve implemented this technique http://www.ethelred.org/articles/2006/10/22/conditional-use-of-page-cache-in-rails to only send a request to rails w…

---

## [New to rails - question about :through and habtm - example](https://www.ruby-forum.com/t/new-to-rails-question-about-through-and-habtm-example/112350)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 4\
**Last updated:** [August 18, 2007, 10:22am UTC](https://www.ruby-forum.com/t/new-to-rails-question-about-through-and-habtm-example/112350 "2007-08-18T10:22:32Z")

</div>

I’ve been designing databases for a few years now, but I’m just recently starting a project, and rails seems like a good candidate to use for it. I think I might be confused about how rails deals with associations, th…

---

## [Completely un-understandable behavior in a simple Model](https://www.ruby-forum.com/t/completely-un-understandable-behavior-in-a-simple-model/111918)

<div class="topic-metadata">

**Author:** [@KSRajesh](https://www.ruby-forum.com/u/KSRajesh)\
**Replies:** 4\
**Last updated:** [August 18, 2007, 9:13am UTC](https://www.ruby-forum.com/t/completely-un-understandable-behavior-in-a-simple-model/111918 "2007-08-18T09:13:27Z")

</div>

Hi, I have been working on RoR for about 8 months now. I have 3 websites live and running well on RoR using all sorts of inter-table relationships (has\_many, HABTM, has\_many, :through -= you name it). It is in this b…

---

## [Helpers](https://www.ruby-forum.com/t/helpers/110294)

<div class="topic-metadata">

**Author:** [@gordon](https://www.ruby-forum.com/u/gordon)\
**Replies:** 3\
**Last updated:** [August 18, 2007, 7:32am UTC](https://www.ruby-forum.com/t/helpers/110294 "2007-08-18T07:32:21Z")

</div>

I have the following helper (see below) with two calls to observe\_field. In the viewer, the helper is used according to: \<%= observe\_slider ‘time’, 0.1, ‘display\_full\_size’, “slider\_val”, u\[1\] %\> Only the second c…

---

## [Has\_many :through a belongs\_to](https://www.ruby-forum.com/t/has-many-through-a-belongs-to/112370)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 2\
**Last updated:** [August 18, 2007, 6:21am UTC](https://www.ruby-forum.com/t/has-many-through-a-belongs-to/112370 "2007-08-18T06:21:18Z")

</div>

I’m trying to set up a has\_many through association, and it should go through a belongs\_to assocation. class Company has\_many :videos end class Site belongs\_to :company has\_many :videos, :through =\> :company end …

---

## [Help with partials / pagination strategy](https://www.ruby-forum.com/t/help-with-partials-pagination-strategy/112387)

<div class="topic-metadata">

**Author:** [@charlie\_caroff](https://www.ruby-forum.com/u/charlie_caroff)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 6:01am UTC](https://www.ruby-forum.com/t/help-with-partials-pagination-strategy/112387 "2007-08-18T06:01:17Z")

</div>

Hi, I have a few simple lists that I’m displaying all over my site, as paginated partials. Sometimes a given list shows 5 items, sometimes 10, sometimes 20, depending on what page is being displayed. Sometimes a lis…

---

## [Running rails on Linux](https://www.ruby-forum.com/t/running-rails-on-linux/196432)

<div class="topic-metadata">

**Author:** [@bloc](https://www.ruby-forum.com/u/bloc)\
**Replies:** 3\
**Last updated:** [August 18, 2007, 5:57am UTC](https://www.ruby-forum.com/t/running-rails-on-linux/196432 "2007-08-18T05:57:17Z")

</div>

Hi guys, I initially developed an application using Locomotive on Mac OS X. I developed 2 applications which use one database. Now I would like to export them to a Linux box. How do I go about doing that. My applicat…

---

## [Parenthesize argument(s)](https://www.ruby-forum.com/t/parenthesize-argument-s/112380)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 1\
**Last updated:** [August 18, 2007, 3:39am UTC](https://www.ruby-forum.com/t/parenthesize-argument-s/112380 "2007-08-18T03:39:09Z")

</div>

So, I read somewhere that you don’t have to parenthesize function arguments in ruby. So then I’m in irb and I call puts Hello.say\_hello “Alex E.” and it says, “warning: parenthesize argument(s) for future version”. S…

---

## [Constant becoming undefined](https://www.ruby-forum.com/t/constant-becoming-undefined/112375)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 1:53am UTC](https://www.ruby-forum.com/t/constant-becoming-undefined/112375 "2007-08-18T01:53:11Z")

</div>

I’m using edge rails. When I first start my server, it works. When I refresh a screen, a constant is now undefined. The constant is loaded in the config files. Anyone seen something like this before? Thanks, Perry …

---

## [Object caching](https://www.ruby-forum.com/t/object-caching/112212)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 5\
**Last updated:** [August 18, 2007, 1:38am UTC](https://www.ruby-forum.com/t/object-caching/112212 "2007-08-18T01:38:59Z")

</div>

Does Rails cache all objects that are accessed during a request? If one object is accessed several times during a request, would its value be read from memory, or fetched from the database over and over again? I’m su…

---

## [Problem of switching to edge rails](https://www.ruby-forum.com/t/problem-of-switching-to-edge-rails/110017)

<div class="topic-metadata">

**Author:** [@stainless](https://www.ruby-forum.com/u/stainless)\
**Replies:** 2\
**Last updated:** [August 18, 2007, 12:48am UTC](https://www.ruby-forum.com/t/problem-of-switching-to-edge-rails/110017 "2007-08-18T00:48:54Z")

</div>

can’t boot with “/script/server” but works with “mongrel\_rails start”. why? /path/to/myproject/$ ./script/server =\> Booting WEBrick... /path/to/myproject/vendor/rails/activesupport/lib/active\_support/dependencies.rb:4…

---

## [Problem with AJAX Picklists on Edit](https://www.ruby-forum.com/t/problem-with-ajax-picklists-on-edit/112152)

<div class="topic-metadata">

**Author:** [@scotdb](https://www.ruby-forum.com/u/scotdb)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 11:52pm UTC](https://www.ruby-forum.com/t/problem-with-ajax-picklists-on-edit/112152 "2007-08-17T23:52:49Z")

</div>

Folks, I’m using a couple of picklists, populated from database tables, to take in Country and State in a form. The Countries and States models are in a belongs\_to / has\_many relationship, but not all countries hav…

---

## [Calls between methods of application.rb](https://www.ruby-forum.com/t/calls-between-methods-of-application-rb/112368)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 17, 2007, 11:49pm UTC](https://www.ruby-forum.com/t/calls-between-methods-of-application-rb/112368 "2007-08-17T23:49:49Z")

</div>

I have a set\_lang() and a write\_to\_log() method in app/controllers/application.rb set\_lang() calls write\_to\_log(). Nothing happens. I should expect that write\_to\_log is either called or an exception is thrown. Howeve…

---

## [Eclipse & subversion](https://www.ruby-forum.com/t/eclipse-subversion/193998)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 9\
**Last updated:** [August 17, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/eclipse-subversion/193998 "2007-08-17T23:18:45Z")

</div>

Hi I am using eclipse as an IDE and am setting up a subversion server. In trying to add subeclipse I get the message: “Subclipse Mylar Integration (1.0.1) requires plug-in “org.eclipse.mylar.tasks.core (0.9.2)”, or …

---

## [Frustrations with routing](https://www.ruby-forum.com/t/frustrations-with-routing/196435)

<div class="topic-metadata">

**Author:** [@cidol](https://www.ruby-forum.com/u/cidol)\
**Replies:** 0\
**Last updated:** [August 17, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/196435 "2007-08-17T22:59:42Z")

</div>

Lets say I’ve got this mapped out map.resources :owners do |owners| owners.resources :possessions This gives me routes looking like this: …/owners/:id/ …/owners/:owner\_id/possessions/:id/ I’m very frustrated that t…

---

## [Has\_session\_object](https://www.ruby-forum.com/t/has-session-object/111865)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/has-session-object/111865 "2007-08-17T21:46:37Z")

</div>

Hi, No matter what I do, has\_session\_object always return false… The site itself has no problem logging in users. Can someone help please ? in my test unit: class AccountControllerTest \< Test::Unit::TestCase fixtur…

---

## [RSpec --format --html:/path/to/file.html](https://www.ruby-forum.com/t/rspec-format-html-path-to-file-html/112359)

<div class="topic-metadata">

**Author:** [@cskidmore](https://www.ruby-forum.com/u/cskidmore)\
**Replies:** 0\
**Last updated:** [August 17, 2007, 9:28pm UTC](https://www.ruby-forum.com/t/rspec-format-html-path-to-file-html/112359 "2007-08-17T21:28:28Z")

</div>

I tried posting this to the RSpec news list but apparently there’s something wrong with my account. It never showed up as far as I can tell… Greetings everyone. I’m learning RSpec and am pretty fresh to Ruby/Rails, …

---

## [Problem with Breakpoint/IRB](https://www.ruby-forum.com/t/problem-with-breakpoint-irb/111700)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [August 17, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/problem-with-breakpoint-irb/111700 "2007-08-17T21:20:33Z")

</div>

I have just set up Rails on a Macbook with Rails 1.2.3 and Ruby 1.8.6 (2007-03-13 patchlevel 0) \[i686-darwin8.10.1\]. When I run my unit tests with a breakpoint, the IRB session does not allow me to access the variable…

---

## [Link\_to\_remote](https://www.ruby-forum.com/t/link-to-remote/112349)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 3\
**Last updated:** [August 17, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/link-to-remote/112349 "2007-08-17T21:13:32Z")

</div>

I have a link\_to\_remote that when clicked will put a form in a div and there are three such links. The problem taht I having is that when this form is placed with the div and the submit botton is hit, the method gets …

---

## [Zipping a file after upload, file\_column](https://www.ruby-forum.com/t/zipping-a-file-after-upload-file-column/112357)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 17, 2007, 9:05pm UTC](https://www.ruby-forum.com/t/zipping-a-file-after-upload-file-column/112357 "2007-08-17T21:05:31Z")

</div>

I’m using file\_column and I’m not sure where to put code for zipping (compressing) a file. I want to upload an audio file, but compress it as a .zip file before saving. That way I can force downloads rather than havi…

---

## [Uploading images for a model that isn't yet saved](https://www.ruby-forum.com/t/uploading-images-for-a-model-that-isnt-yet-saved/112355)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 0\
**Last updated:** [August 17, 2007, 8:45pm UTC](https://www.ruby-forum.com/t/uploading-images-for-a-model-that-isnt-yet-saved/112355 "2007-08-17T20:45:30Z")

</div>

In a couple of applications I’m working on I have a need to allow users to upload images which are then tied to something they’re creating by filling out a form (a model in my DB). In both cases I’d like them to be ab…

---

## [Problem Installing RMagick](https://www.ruby-forum.com/t/problem-installing-rmagick/196436)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 17, 2007, 8:38pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/196436 "2007-08-17T20:38:28Z")

</div>

Okay, so I am setting up a brand new Macbook and can’t seem to get RMagick or ImageMagick to install with Darwin Ports. Can anyone give me some insight as to why this may be failing? I get the same error when I do a…

---

## [Problem "ruby script/server", if I need change the program?](https://www.ruby-forum.com/t/problem-ruby-script-server-if-i-need-change-the-program/112301)

<div class="topic-metadata">

**Author:** [@Zhan\_feng\_W](https://www.ruby-forum.com/u/Zhan_feng_W)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 8:37pm UTC](https://www.ruby-forum.com/t/problem-ruby-script-server-if-i-need-change-the-program/112301 "2007-08-17T20:37:28Z")

</div>

How come like this: ruby script/server =\> Booting WEBrick… /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in gem\_original\_require': ./script/../config/../config/environment.rb:8: syntax error, unexpe…

---

## [Cant get attachment\_fu to store files outside of RAILS\_ROOT](https://www.ruby-forum.com/t/cant-get-attachment-fu-to-store-files-outside-of-rails-root/109805)

<div class="topic-metadata">

**Author:** [@mjt](https://www.ruby-forum.com/u/mjt)\
**Replies:** 2\
**Last updated:** [August 17, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/cant-get-attachment-fu-to-store-files-outside-of-rails-root/109805 "2007-08-17T20:35:27Z")

</div>

I am trying to get attachment\_fu to store files in a separate directory tree, so that when I use Capistrano to update the site the ‘public/files’ directory doesnt get left behind, thus losing the previously uploaded f…

---

## [Folders and files outside of ROOT](https://www.ruby-forum.com/t/folders-and-files-outside-of-root/112153)

<div class="topic-metadata">

**Author:** [@fernando](https://www.ruby-forum.com/u/fernando)\
**Replies:** 2\
**Last updated:** [August 17, 2007, 8:32pm UTC](https://www.ruby-forum.com/t/folders-and-files-outside-of-root/112153 "2007-08-17T20:32:27Z")

</div>

Hi, My problem is similar to: http://groups.google.co.uk/group/rubyonrails-talk/browse\_thread/thread/783a7821b13517ca/8c9543e2e6e79472?lnk=gst&q=outside+the+root&rnum=2&hl=en I am using attachment\_fu to allows users t…

---

## [Umlaute in selectbox](https://www.ruby-forum.com/t/umlaute-in-selectbox/112337)

<div class="topic-metadata">

**Author:** [@luma](https://www.ruby-forum.com/u/luma)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/umlaute-in-selectbox/112337 "2007-08-17T19:59:23Z")

</div>

I’ve got a form.select that takes the choices from an array in the model customer\_adresse. When I write “ü” and “ä” in the prompt and the keys of the array, I see “ü” and “ä” in the selectbox. When I simply write thes…

---

## [Need volunteers for new Rails based shopping cart](https://www.ruby-forum.com/t/need-volunteers-for-new-rails-based-shopping-cart/112348)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/need-volunteers-for-new-rails-based-shopping-cart/112348 "2007-08-17T19:52:22Z")

</div>

We’re currently looking for volunteers on the new RailsCart\[1\] project. The idea is to build something relatively simple with all of the features that most open source shopping carts seem to be missing. We’ll be usin…

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

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