# Rails

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

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

---

## [Problems getting a particular version](https://www.ruby-forum.com/t/problems-getting-a-particular-version/180510)

<div class="topic-metadata">

**Author:** [@soldier.coder](https://www.ruby-forum.com/u/soldier.coder)\
**Replies:** 0\
**Last updated:** [December 20, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/problems-getting-a-particular-version/180510 "2009-12-20T23:16:13Z")

</div>

I am running on windows and try the following command to no avail: gem install rails --version 2.2.2 and I get back: ERROR: could not find rails locally or in a repository. Why do I get this error? How do I fix it? –…

---

## [Problem with autocomplete](https://www.ruby-forum.com/t/problem-with-autocomplete/180507)

<div class="topic-metadata">

**Author:** [@longhorn](https://www.ruby-forum.com/u/longhorn)\
**Replies:** 0\
**Last updated:** [December 20, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/problem-with-autocomplete/180507 "2009-12-20T20:32:57Z")

</div>

The another problem i solved, because just have to render the view new \<%= text\_field\_with\_auto\_complete :alergias\_paciente, :alergia\_nombre, { :size =30 }, { :url =alergia\_path(:js), :method =:get, :param\_name = ‘s…

---

## [Noob Install Failed 0.0.0.0:3000](https://www.ruby-forum.com/t/noob-install-failed-0-0-0-0-3000/180504)

<div class="topic-metadata">

**Author:** [@BearState](https://www.ruby-forum.com/u/BearState)\
**Replies:** 3\
**Last updated:** [December 20, 2009, 8:01pm UTC](https://www.ruby-forum.com/t/noob-install-failed-0-0-0-0-3000/180504 "2009-12-20T20:01:55Z")

</div>

Happy Holidays, I am new to RoR and have just run through the install, which well seemed to be vaquely documented as some ‘Do this’ type of thing on the http://rubyonrails.org/download page. download gem setup.rb …

---

## [Search encrypted data](https://www.ruby-forum.com/t/search-encrypted-data/180505)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 0\
**Last updated:** [December 20, 2009, 7:38pm UTC](https://www.ruby-forum.com/t/search-encrypted-data/180505 "2009-12-20T19:38:19Z")

</div>

I encrypt a few fields in a table. How can I search for data in rails and these fields? Can I make a temporary table that is decrypted with original text on the fly, which is destroyed after a search? I encrypt and de…

---

## [Slideshow](https://www.ruby-forum.com/t/slideshow/180480)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 2\
**Last updated:** [December 20, 2009, 7:07pm UTC](https://www.ruby-forum.com/t/slideshow/180480 "2009-12-20T19:07:29Z")

</div>

It appears that the question, “How do I create a slide show” has been asked many times in a variety of ways in this group. Reference has been made to the O’Reilly book, “Ajax on Rails”. Maybe I need to read that. I…

---

## [Script/plugin does not work!](https://www.ruby-forum.com/t/script-plugin-does-not-work/180502)

<div class="topic-metadata">

**Author:** [@demec](https://www.ruby-forum.com/u/demec)\
**Replies:** 2\
**Last updated:** [December 20, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/script-plugin-does-not-work/180502 "2009-12-20T17:50:49Z")

</div>

Whenever I try to install a plugin using the commands script/plugin instal … I only get an empty folder under the vendor/plugins dir. This happened for a couple of plugins I tried to install (attachmnet\_fu, paperclip)…

---

## [Mysql on a fresh snow leopard install](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 6\
**Last updated:** [December 20, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/mysql-on-a-fresh-snow-leopard-install/180287 "2009-12-20T16:50:14Z")

</div>

Simply, what’s the best way for me to put mysql on a fresh snow leopard install? Do I need xcode installed first? Thanks. bb

---

## [Updating updated\_at column on a belongs\_to](https://www.ruby-forum.com/t/updating-updated-at-column-on-a-belongs-to/180373)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 5\
**Last updated:** [December 20, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/updating-updated-at-column-on-a-belongs-to/180373 "2009-12-20T16:48:39Z")

</div>

I have a… class Resort \< ActiveRecord::Base has\_many :photos, :order =\> “position” end class Photo \< ActiveRecord::Base belongs\_to :resort end What I have a problem with is that if I update a photo I really need t…

---

## [What's the "update" equivalent to the "build" method?](https://www.ruby-forum.com/t/whats-the-update-equivalent-to-the-build-method/180482)

<div class="topic-metadata">

**Author:** [@AlwaysCharging](https://www.ruby-forum.com/u/AlwaysCharging)\
**Replies:** 3\
**Last updated:** [December 20, 2009, 3:24am UTC](https://www.ruby-forum.com/t/whats-the-update-equivalent-to-the-build-method/180482 "2009-12-20T03:24:38Z")

</div>

Currently I’m using .build in my Create action so that I have a little more control before it gets saved. For instance, I have: @comment = current\_user.comments.build(params\[:comment\]) @comment.blog\_comment = @commen…

---

## [Tagging gem (permalink support)](https://www.ruby-forum.com/t/tagging-gem-permalink-support/180479)

<div class="topic-metadata">

**Author:** [@introvert](https://www.ruby-forum.com/u/introvert)\
**Replies:** 0\
**Last updated:** [December 19, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/tagging-gem-permalink-support/180479 "2009-12-19T18:35:46Z")

</div>

Hello, I’ve been looking for a rails tagging gem that would support permalinks. I’ve been using acts-as-taggable-on but it happens if I have tags with spaces or foreign letters it wont create clean permalinks so I’ve …

---

## [Authentic staging environment](https://www.ruby-forum.com/t/authentic-staging-environment/179997)

<div class="topic-metadata">

**Author:** [@zaczheng](https://www.ruby-forum.com/u/zaczheng)\
**Replies:** 2\
**Last updated:** [December 19, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/authentic-staging-environment/179997 "2009-12-19T16:30:58Z")

</div>

I want to create an authentic staging environment where it will function precisely as it does in the production environment. Given some plugins, e.g. asset packager, will behave differently if it’s not in ‘production’…

---

## [Buying book from library](https://www.ruby-forum.com/t/buying-book-from-library/180345)

<div class="topic-metadata">

**Author:** [@xytk](https://www.ruby-forum.com/u/xytk)\
**Replies:** 3\
**Last updated:** [December 19, 2009, 7:26am UTC](https://www.ruby-forum.com/t/buying-book-from-library/180345 "2009-12-19T07:26:19Z")

</div>

hi i’m very new to ROR. i must do a basic library system its my homework. i have models, user.rb (created by restful\_authentication plugin) and book.rb (created by scaffolding) controllers: sessions\_controller and…

---

## [Share a subroutine with all controllers](https://www.ruby-forum.com/t/share-a-subroutine-with-all-controllers/180370)

<div class="topic-metadata">

**Author:** [@softwarewin](https://www.ruby-forum.com/u/softwarewin)\
**Replies:** 6\
**Last updated:** [December 19, 2009, 12:32am UTC](https://www.ruby-forum.com/t/share-a-subroutine-with-all-controllers/180370 "2009-12-19T00:32:16Z")

</div>

Hi, I would like to create a subroutine to use in all my admin\_controller. Actuall in my admin\_controller I have: def acronym\_guide … @guide.description=@guide.description.gsub(/ PPC /," \<acronym title=#{34.chr}Poc…

---

## [Rails Object in DB is Invalid](https://www.ruby-forum.com/t/rails-object-in-db-is-invalid/180006)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 5\
**Last updated:** [December 18, 2009, 11:50pm UTC](https://www.ruby-forum.com/t/rails-object-in-db-is-invalid/180006 "2009-12-18T23:50:00Z")

</div>

I have a model named Tickets that being saved to the database even when invalid. This is stopping me from using validations to help prevent duplicate data being saved to the DB. In script/console Ticket.last.valid? …

---

## [Where/how to store a setting?](https://www.ruby-forum.com/t/where-how-to-store-a-setting/180378)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 8:16pm UTC](https://www.ruby-forum.com/t/where-how-to-store-a-setting/180378 "2009-12-18T20:16:17Z")

</div>

I have a task which queries the database and gets the relevant records from the last 5 days. I’d like to make that 5 a variable. Where/how would you recommend storing that data so that it can be accessed and changed a…

---

## [Deployment failing due to invalid rubygems on server](https://www.ruby-forum.com/t/deployment-failing-due-to-invalid-rubygems-on-server/179980)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 7:32pm UTC](https://www.ruby-forum.com/t/deployment-failing-due-to-invalid-rubygems-on-server/179980 "2009-12-18T19:32:48Z")

</div>

I am getting the following message when deploying with capistrano. However, I do have the latest version (1.3.5) of rubygems installed on the server. Rails requires RubyGems \>= 1.3.2 (you have 1.3.1). Please gem upd…

---

## [How can i subtraction variables from a form?](https://www.ruby-forum.com/t/how-can-i-subtraction-variables-from-a-form/180348)

<div class="topic-metadata">

**Author:** [@longhorn](https://www.ruby-forum.com/u/longhorn)\
**Replies:** 3\
**Last updated:** [December 18, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/how-can-i-subtraction-variables-from-a-form/180348 "2009-12-18T19:06:29Z")

</div>

Hi, i will try to explain me very well, because i dont speak english. Well im trying to do this: i have 3 fields in my table: charge, payment, balance but the third field balance is a the result of a subtraction, but …

---

## [Convention for using initializers end environments in engine](https://www.ruby-forum.com/t/convention-for-using-initializers-end-environments-in-engine/180361)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [December 18, 2009, 5:29pm UTC](https://www.ruby-forum.com/t/convention-for-using-initializers-end-environments-in-engine/180361 "2009-12-18T17:29:03Z")

</div>

Hi Guys, First of all great job with an extremely useful plugin infrastructure. Ive been looking at migrating part of some existing code into an engine within rails 2.3. Essentially trying to modularize some code. We …

---

## [Conditions Issue](https://www.ruby-forum.com/t/conditions-issue/180360)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 6\
**Last updated:** [December 18, 2009, 3:25pm UTC](https://www.ruby-forum.com/t/conditions-issue/180360 "2009-12-18T15:25:35Z")

</div>

Controller: def demonstration\_domains @projects = Project.find(:all, :conditions =\> :demo\_domain != nil) end View: \<% for project in @projects %\> \<% end %\> Those conditions do not seem to have any effect. Is t…

---

## [How can I paste Rails code into my blog with Textmate style](https://www.ruby-forum.com/t/how-can-i-paste-rails-code-into-my-blog-with-textmate-style/180332)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 3\
**Last updated:** [December 18, 2009, 8:02am UTC](https://www.ruby-forum.com/t/how-can-i-paste-rails-code-into-my-blog-with-textmate-style/180332 "2009-12-18T08:02:24Z")

</div>

I have a blog made on Ruby on Rails and I want to paste some code to have an example of doing certain task. I want this code to show like it shows on Textmate. How can I do it? I’ll appreciate any help

---

## [Convert XML/JSON reponse to ActiveRecord object](https://www.ruby-forum.com/t/convert-xml-json-reponse-to-activerecord-object/180315)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 1\
**Last updated:** [December 18, 2009, 7:53am UTC](https://www.ruby-forum.com/t/convert-xml-json-reponse-to-activerecord-object/180315 "2009-12-18T07:53:41Z")

</div>

I need to convert the xml/JSON response into an ActiveRecord object. For example, \<?xml version="1.0" encoding="UTF-8"?\> true removed\_email\_address@domain.invalid 1 9324405627 9324405627 Har…

---

## [Using .sum](https://www.ruby-forum.com/t/using-sum/180329)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 4\
**Last updated:** [December 18, 2009, 7:45am UTC](https://www.ruby-forum.com/t/using-sum/180329 "2009-12-18T07:45:46Z")

</div>

I have three tables: artists, albums, songs. What I want is to find the total duration of all songs in a given album. Artist.first.albums.first.songs.collect{|x|x.duration} Of course, the above generates an array co…

---

## [Ruby on Rails and MS Access](https://www.ruby-forum.com/t/ruby-on-rails-and-ms-access/129576)

<div class="topic-metadata">

**Author:** [@PAZAZ](https://www.ruby-forum.com/u/PAZAZ)\
**Replies:** 21\
**Last updated:** [December 18, 2009, 1:52am UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-ms-access/129576 "2009-12-18T01:52:10Z")

</div>

How do I connect an existing or new Access database with Ruby on Rails? I am new to Ruby on Rails and a tutorial I am going through mentions using MySQL but I don’t have MySQL and only work with MS Access. Is MySQL a…

---

## [Calling a javascript from controller](https://www.ruby-forum.com/t/calling-a-javascript-from-controller/180342)

<div class="topic-metadata">

**Author:** [@mayur\_sk](https://www.ruby-forum.com/u/mayur_sk)\
**Replies:** 1\
**Last updated:** [December 17, 2009, 11:36pm UTC](https://www.ruby-forum.com/t/calling-a-javascript-from-controller/180342 "2009-12-17T23:36:42Z")

</div>

i am calling a javascript controller like page.call “function\_name”, “args1” this works fine in Firefox but not in IE 8 . thanks for your help

---

## [Getting error in using nested resource](https://www.ruby-forum.com/t/getting-error-in-using-nested-resource/180324)

<div class="topic-metadata">

**Author:** [@hunt](https://www.ruby-forum.com/u/hunt)\
**Replies:** 1\
**Last updated:** [December 17, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/getting-error-in-using-nested-resource/180324 "2009-12-17T15:52:24Z")

</div>

map.resources :posts, has\_many :comments in route.rb The routes are as follows… posts GET /posts(.:format) {:controller=\>“posts”, :action=\>“index”} POST /posts(.:format) {:controller=\>“posts”, …

---

## [Changing link\_to (with :method =\> :put) in ajax version](https://www.ruby-forum.com/t/changing-link-to-with-method-put-in-ajax-version/180322)

<div class="topic-metadata">

**Author:** [@spitfire](https://www.ruby-forum.com/u/spitfire)\
**Replies:** 0\
**Last updated:** [December 17, 2009, 1:19pm UTC](https://www.ruby-forum.com/t/changing-link-to-with-method-put-in-ajax-version/180322 "2009-12-17T13:19:02Z")

</div>

Im wondering if someone of you have resolved this problem. If you are using JQuery, and you want to replace the onclick event of link generated (with link\_to) with a ajax call (PUT) How should you make it ? This is …

---

## [Error in migrating the Postgres database](https://www.ruby-forum.com/t/error-in-migrating-the-postgres-database/177820)

<div class="topic-metadata">

**Author:** [@madhuri\_godade](https://www.ruby-forum.com/u/madhuri_godade)\
**Replies:** 4\
**Last updated:** [December 17, 2009, 12:50pm UTC](https://www.ruby-forum.com/t/error-in-migrating-the-postgres-database/177820 "2009-12-17T12:50:54Z")

</div>

I want to create a rails application using postgres database. Update a username and password terp and agile respectively. When i run the command rake db:create and rake db:migrate it is giving mi an error… uninitiali…

---

## [Deployment using Passener](https://www.ruby-forum.com/t/deployment-using-passener/180316)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 0\
**Last updated:** [December 17, 2009, 9:15am UTC](https://www.ruby-forum.com/t/deployment-using-passener/180316 "2009-12-17T09:15:48Z")

</div>

Hi, I want to know that Without apache the deployment with Passener can be possible? Thanks, Tushar

---

## [Phusion passenger with netbeans to debug the rails applicati](https://www.ruby-forum.com/t/phusion-passenger-with-netbeans-to-debug-the-rails-applicati/180314)

<div class="topic-metadata">

**Author:** [@periyasamy](https://www.ruby-forum.com/u/periyasamy)\
**Replies:** 0\
**Last updated:** [December 17, 2009, 7:27am UTC](https://www.ruby-forum.com/t/phusion-passenger-with-netbeans-to-debug-the-rails-applicati/180314 "2009-12-17T07:27:15Z")

</div>

Hi, I am using centOS system and I am running the rails application using Phusion passenger. I want to run the rails application with Phusion passenger and NetBeans. Particularly i want to debug the rails application…

---

## [Database access problem in different servers](https://www.ruby-forum.com/t/database-access-problem-in-different-servers/180312)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 0\
**Last updated:** [December 17, 2009, 7:15am UTC](https://www.ruby-forum.com/t/database-access-problem-in-different-servers/180312 "2009-12-17T07:15:11Z")

</div>

i have two machines are called mpfslice1, mpfslice2. The two slices are in different location. mpfslice1 have weekrep\_dev database and rails project called weekreport. If weekreport connects with weekrep\_dev database…

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

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