# Rails

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

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

---

## [\[JOB\] Lead Web Developer, NYC | 80-100k](https://www.ruby-forum.com/t/job-lead-web-developer-nyc-80-100k/166483)

<div class="topic-metadata">

**Author:** [@OSS](https://www.ruby-forum.com/u/OSS)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 11:47pm UTC](https://www.ruby-forum.com/t/job-lead-web-developer-nyc-80-100k/166483 "2009-04-25T23:47:28Z")

</div>

Our New York City client is the developer of the worlds first marketplace for privately held businesses, seeks a lead engineer to join our team and lead the development of our next generation of our web-based product …

---

## [Ferret, will\_paginate and group by](https://www.ruby-forum.com/t/ferret-will-paginate-and-group-by/166482)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 11:10pm UTC](https://www.ruby-forum.com/t/ferret-will-paginate-and-group-by/166482 "2009-04-25T23:10:03Z")

</div>

Hi, Is it possible to use “find\_with\_ferret” and GROUP BY together? Count(\*) doesn’t return what will\_paginate expects when using GROUP BY, and AFAIK a workaround for that is to manually get total\_entries and pass it…

---

## [Question about running ror apps](https://www.ruby-forum.com/t/question-about-running-ror-apps/166466)

<div class="topic-metadata">

**Author:** [@nanouk](https://www.ruby-forum.com/u/nanouk)\
**Replies:** 1\
**Last updated:** [April 25, 2009, 11:06pm UTC](https://www.ruby-forum.com/t/question-about-running-ror-apps/166466 "2009-04-25T23:06:40Z")

</div>

hi all, i have got my laptop for making apps in ror but im just wondering when i setup my server to run it do i install ruby irb gems, or do i just install ruby as this will be only to run it. ps. what others bits do…

---

## [Passing an object to post :create](https://www.ruby-forum.com/t/passing-an-object-to-post-create/166292)

<div class="topic-metadata">

**Author:** [@Commander\_J](https://www.ruby-forum.com/u/Commander_J)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 9:24pm UTC](https://www.ruby-forum.com/t/passing-an-object-to-post-create/166292 "2009-04-25T21:24:41Z")

</div>

Hi, In a Rails functional test, you can say this: post :create, :post =\> { :body =\> ‘This is my post.’, :title =\> ‘Welcome to my post’ } This works until you change the Post class’ validation properties. Is there …

---

## [Collection\_select help](https://www.ruby-forum.com/t/collection-select-help/166397)

<div class="topic-metadata">

**Author:** [@amna](https://www.ruby-forum.com/u/amna)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 9:07pm UTC](https://www.ruby-forum.com/t/collection-select-help/166397 "2009-04-25T21:07:07Z")

</div>

Hi, I’m new at this… can you please help me… the drop down menus are fine, however when i click submit the selection is not saved and it tells me that movie and type can’t be blank Here is my movie\_types controller …

---

## [Ruby on rails web calendar](https://www.ruby-forum.com/t/ruby-on-rails-web-calendar/112071)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 12\
**Last updated:** [April 25, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-web-calendar/112071 "2009-04-25T20:09:40Z")

</div>

Does anyone know of a good web calendar that you can use to display appointments, dates, anniversaries, birthdays, recurring appointments, appointments spanning multiple days?

---

## [Shopping Cart sales tax calculation tools?](https://www.ruby-forum.com/t/shopping-cart-sales-tax-calculation-tools/166473)

<div class="topic-metadata">

**Author:** [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 8:06pm UTC](https://www.ruby-forum.com/t/shopping-cart-sales-tax-calculation-tools/166473 "2009-04-25T20:06:16Z")

</div>

Can anyone recommend a good service, sdk, gem or plugin etc… that works well with Rails that I can use to calculate sales tax on items being sold through a small ecomm site we’re developing? FYI. our gateway is author…

---

## [How do you ( successful programmers ) track your site traffic?](https://www.ruby-forum.com/t/how-do-you-successful-programmers-track-your-site-traffic/166468)

<div class="topic-metadata">

**Author:** [@InventoryTrackers](https://www.ruby-forum.com/u/InventoryTrackers)\
**Replies:** 1\
**Last updated:** [April 25, 2009, 7:53pm UTC](https://www.ruby-forum.com/t/how-do-you-successful-programmers-track-your-site-traffic/166468 "2009-04-25T19:53:58Z")

</div>

I’m finally at a place after developing countless losing business websites of finally getting some traffic. I am aware of the Request object and the fields describing where the request came from and where others go. …

---

## [Default scaffold makes a test.rb with errors](https://www.ruby-forum.com/t/default-scaffold-makes-a-test-rb-with-errors/166439)

<div class="topic-metadata">

**Author:** [@adsouzp](https://www.ruby-forum.com/u/adsouzp)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 7:45pm UTC](https://www.ruby-forum.com/t/default-scaffold-makes-a-test-rb-with-errors/166439 "2009-04-25T19:45:47Z")

</div>

Lines 24, 29, 34, (39 and 40) show errors I received when I used – trace when I db:migrate all saying: test\_should\_show\_contact(ContactsControllerTest): NoMethodError: undefined method \`contacts’ Is the default file …

---

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

<div class="topic-metadata">

**Author:** [@faterin](https://www.ruby-forum.com/u/faterin)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/problem-when-run-script-server/166467 "2009-04-25T18:53:12Z")

</div>

hello, I have some problem when run command “ruby script/server” to display website on localhost:3000 first I create rails by “rails demo” and then I “cd” to demo and use command “ruby script/server” =\> Booting WEBri…

---

## [Built associations don't know their parent. Why not?](https://www.ruby-forum.com/t/built-associations-dont-know-their-parent-why-not/166201)

<div class="topic-metadata">

**Author:** [@hakunin](https://www.ruby-forum.com/u/hakunin)\
**Replies:** 16\
**Last updated:** [April 25, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/built-associations-dont-know-their-parent-why-not/166201 "2009-04-25T17:48:46Z")

</div>

Simple example. class Car \< ActiveRecord::Base has\_one :engine validates\_presence\_of :engine validates\_associated :engine end class Engine \< ActiveRecord::Base belongs\_to :car validates\_presence\_of :car end @ca…

---

## [Named\_scope and Time.zone](https://www.ruby-forum.com/t/named-scope-and-time-zone/166446)

<div class="topic-metadata">

**Author:** [@idrifter](https://www.ruby-forum.com/u/idrifter)\
**Replies:** 4\
**Last updated:** [April 25, 2009, 2:51pm UTC](https://www.ruby-forum.com/t/named-scope-and-time-zone/166446 "2009-04-25T14:51:21Z")

</div>

So I’m trying to use a named scope to show upcoming events like so: class Event named\_scope :upcoming, :conditions =\> \[“starts\_at \>= ?”, Time.zone.now.beginning\_of\_day\] end In my application controller I am setting …

---

## [Test::Unit reports are a pain to read](https://www.ruby-forum.com/t/test-unit-reports-are-a-pain-to-read/166449)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 3\
**Last updated:** [April 25, 2009, 2:13pm UTC](https://www.ruby-forum.com/t/test-unit-reports-are-a-pain-to-read/166449 "2009-04-25T14:13:20Z")

</div>

Hi, Does Test::Unit output unreadable test results on purpose? It’s always a huge pain to: identify in which test file the error occured which test failed where in my application code the error was raised Is there a…

---

## [Strategy for handling historical dates while avoiding timezones](https://www.ruby-forum.com/t/strategy-for-handling-historical-dates-while-avoiding-timezones/166448)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/strategy-for-handling-historical-dates-while-avoiding-timezones/166448 "2009-04-25T13:44:04Z")

</div>

Currently using t.datetime, dates get stored with a timezone and a non- zero time. This is bad. A date restricted to the Unix epoch is unacceptable. The date range must be at least back to 1800. Need a recommendation…

---

## [Upgrade application from rails 2.2.2 to 2.3.2](https://www.ruby-forum.com/t/upgrade-application-from-rails-2-2-2-to-2-3-2/163737)

<div class="topic-metadata">

**Author:** [@guoliang](https://www.ruby-forum.com/u/guoliang)\
**Replies:** 4\
**Last updated:** [April 25, 2009, 11:52am UTC](https://www.ruby-forum.com/t/upgrade-application-from-rails-2-2-2-to-2-3-2/163737 "2009-04-25T11:52:47Z")

</div>

Hi, We are upgrading our application to 2.3.2 recently and got a strange problem with session id. We uses ActiveRecord to store sessions and the session id column type was VARCHAR(255). After I started the server, I …

---

## [Validators.rb breaks on update from Rails 2.2.2 to 2.3.2](https://www.ruby-forum.com/t/validators-rb-breaks-on-update-from-rails-2-2-2-to-2-3-2/166447)

<div class="topic-metadata">

**Author:** [@John\_Mackin](https://www.ruby-forum.com/u/John_Mackin)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 11:52am UTC](https://www.ruby-forum.com/t/validators-rb-breaks-on-update-from-rails-2-2-2-to-2-3-2/166447 "2009-04-25T11:52:12Z")

</div>

Hi, I just upgrade from 2.2.2 to 2.3.2 and the following error when trying to start the server =\> Booting Mongrel =\> Rails 2.3.2 application starting on http://0.0.0.0:3000 /opt/local/lib/ruby/gems/1.8/gems/activesu…

---

## [How webrick works](https://www.ruby-forum.com/t/how-webrick-works/166436)

<div class="topic-metadata">

**Author:** [@salil](https://www.ruby-forum.com/u/salil)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 8:11am UTC](https://www.ruby-forum.com/t/how-webrick-works/166436 "2009-04-25T08:11:23Z")

</div>

Hi All, I want to know what is the basic nature of a webrick. Actually i create two instances of my application on my pc one on a MOZILLA and second on a INTERNET EXPLORER. on MOZILLA i uploaded 10 files and on INTER…

---

## [Getting started with database/model relationships](https://www.ruby-forum.com/t/getting-started-with-database-model-relationships/166349)

<div class="topic-metadata">

**Author:** [@bradherman](https://www.ruby-forum.com/u/bradherman)\
**Replies:** 4\
**Last updated:** [April 25, 2009, 7:48am UTC](https://www.ruby-forum.com/t/getting-started-with-database-model-relationships/166349 "2009-04-25T07:48:15Z")

</div>

Hey everyone… I’m just getting my feet wet with relational databases using RoR models. The software I’m putting together relies on car parts. Originally I had the database set up as follows create\_table :parts do |t…

---

## [Static variables](https://www.ruby-forum.com/t/static-variables/166438)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 6:49am UTC](https://www.ruby-forum.com/t/static-variables/166438 "2009-04-25T06:49:52Z")

</div>

Hi In controller I have def role\_wise\_summary\_graph\_render @graph1 = open\_flash\_chart\_object(300,200, “#{summary\_graph\_path(:role\_name =\> ‘Role1’)}”, true) @graph2 = open\_flash\_chart\_object(300,200, “#{summary\_grap…

---

## [Can run up the server after update to 2.3.2](https://www.ruby-forum.com/t/can-run-up-the-server-after-update-to-2-3-2/166433)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 6:41am UTC](https://www.ruby-forum.com/t/can-run-up-the-server-after-update-to-2-3-2/166433 "2009-04-25T06:41:46Z")

</div>

my rails version was 2.2.2 and I turn 2.3.2 last night with gem update and rake rails:freeze:edge. unfortunately I got a problem when I restart my server. a error when I script/server ./script/…/config/…/vendor/rails…

---

## [Overriding Model Name](https://www.ruby-forum.com/t/overriding-model-name/166426)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 4\
**Last updated:** [April 25, 2009, 5:44am UTC](https://www.ruby-forum.com/t/overriding-model-name/166426 "2009-04-25T05:44:13Z")

</div>

If I understand things correctly, by default, Rails expects both the ActiveRecord class name and the model name (i.e., the name of the file that contains the definition of the ActiveRecord class) to be the singluar of…

---

## [ActiveRecord Constraints](https://www.ruby-forum.com/t/activerecord-constraints/166432)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 5:16am UTC](https://www.ruby-forum.com/t/activerecord-constraints/166432 "2009-04-25T05:16:00Z")

</div>

A plugin to easily add constraints into a PostgreSQL database. I think it would be easy to add other database engines to it assuming they implement constraints. The GIT repository is here: The rdoc is here: http:…

---

## ['get\_user\_list' function not working](https://www.ruby-forum.com/t/get-user-list-function-not-working/166430)

<div class="topic-metadata">

**Author:** [@haneef5k](https://www.ruby-forum.com/u/haneef5k)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 4:53am UTC](https://www.ruby-forum.com/t/get-user-list-function-not-working/166430 "2009-04-25T04:53:56Z")

</div>

i want to show fullname by using fuction call ‘get\_user\_list’ , but its not working…?? tis s user.rb ( def full\_name self.first\_name + " " + self.last\_name end ) my post controller ( def get\_user\_list return U…

---

## [Git-rails init can't find HOME environment](https://www.ruby-forum.com/t/git-rails-init-cant-find-home-environment/166429)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [April 25, 2009, 2:52am UTC](https://www.ruby-forum.com/t/git-rails-init-cant-find-home-environment/166429 "2009-04-25T02:52:08Z")

</div>

I’m trying to teach myself version control using GIT on a Windows machine for my ROR development. I downloaded and ran the cygwin and it created the following files: ‘./.bashrc’ -\> ‘/home/Wayne//.bashrc’ ‘./.bach\_pro…

---

## [Background process fork - generating zip files](https://www.ruby-forum.com/t/background-process-fork-generating-zip-files/165321)

<div class="topic-metadata">

**Author:** [@neubyr](https://www.ruby-forum.com/u/neubyr)\
**Replies:** 13\
**Last updated:** [April 25, 2009, 2:48am UTC](https://www.ruby-forum.com/t/background-process-fork-generating-zip-files/165321 "2009-04-25T02:48:35Z")

</div>

I am trying to generate a static archive (zip) as follows: Model has following method def generate\_archive dir = “/tmp/#{self.id}” title = self.title.gsub(/^\\s+/, ‘’).gsub(/\\s+$/, ‘’).gsub(/\\s+/, ‘-’) id = self.id …

---

## [Passing a value to a js function via button\_to\_function](https://www.ruby-forum.com/t/passing-a-value-to-a-js-function-via-button-to-function/166423)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 2:06am UTC](https://www.ruby-forum.com/t/passing-a-value-to-a-js-function-via-button-to-function/166423 "2009-04-25T02:06:25Z")

</div>

I’ve got a table of what I call resources, want to show in a jQuery dialog a particular record when user clicks button in a row. in the table I’m doing: \<%=button\_to\_function 'Show','showresource1()',:class =\>"ui-butt…

---

## [Plugin loading](https://www.ruby-forum.com/t/plugin-loading/166408)

<div class="topic-metadata">

**Author:** [@davidf](https://www.ruby-forum.com/u/davidf)\
**Replies:** 2\
**Last updated:** [April 25, 2009, 1:56am UTC](https://www.ruby-forum.com/t/plugin-loading/166408 "2009-04-25T01:56:18Z")

</div>

I just updated from Rails 1.2.0 to Rails 2.3.2 and none of the app plugins seem to load. The server starts without any problems, but none of the plugin code is available. Help!

---

## [Rake gems not working in test environment](https://www.ruby-forum.com/t/rake-gems-not-working-in-test-environment/166298)

<div class="topic-metadata">

**Author:** [@lee](https://www.ruby-forum.com/u/lee)\
**Replies:** 3\
**Last updated:** [April 25, 2009, 1:42am UTC](https://www.ruby-forum.com/t/rake-gems-not-working-in-test-environment/166298 "2009-04-25T01:42:39Z")

</div>

I am unable to get ‘rake gems’ to run in my test environment. I am using the following command: rake gems RAILS\_ENV=test and getting the error below. rake gems RAILS\_ENV=development works ok. Any thoughts appreciated…

---

## [Constants defined in initializer not found when running gems:install in test](https://www.ruby-forum.com/t/constants-defined-in-initializer-not-found-when-running-gems-install-in-test/166323)

<div class="topic-metadata">

**Author:** [@tobi](https://www.ruby-forum.com/u/tobi)\
**Replies:** 1\
**Last updated:** [April 25, 2009, 1:42am UTC](https://www.ruby-forum.com/t/constants-defined-in-initializer-not-found-when-running-gems-install-in-test/166323 "2009-04-25T01:42:03Z")

</div>

Dear all, I am setting some constants in an initializer, which are used in validations in my models. When I run RAILS\_ENV=test rake gems:install I get missing constant errors for these, but not when I run RAILS\_ENV…

---

## [Button Firefox](https://www.ruby-forum.com/t/button-firefox/166424)

<div class="topic-metadata">

**Author:** [@ghisirds](https://www.ruby-forum.com/u/ghisirds)\
**Replies:** 0\
**Last updated:** [April 25, 2009, 12:21am UTC](https://www.ruby-forum.com/t/button-firefox/166424 "2009-04-25T00:21:09Z")

</div>

Hallo, I often use the saved passwords of my Firefox browser to see and sometimes erase the passwords…only everytime I must go to Tools - Options - Safety - saved password. I was arguing if there is a way to insert a…

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

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