# Rails

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

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

---

## [Pagination](https://www.ruby-forum.com/t/pagination/192445)

<div class="topic-metadata">

**Author:** [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Replies:** 1\
**Last updated:** [July 30, 2010, 1:10pm UTC](https://www.ruby-forum.com/t/pagination/192445 "2010-07-30T13:10:05Z")

</div>

Pagination I am using an old tutorial which is tripping me right up as I have the latest version of rails installed. I’m persisting as I think I’m learning a little bit more about how RoR works. However after installi…

---

## [\`load\_missing\_constant': uninitialized constant Rails::Railt](https://www.ruby-forum.com/t/load-missing-constant-uninitialized-constant-rails-railt/192446)

<div class="topic-metadata">

**Author:** [@amitjain](https://www.ruby-forum.com/u/amitjain)\
**Replies:** 0\
**Last updated:** [July 30, 2010, 12:47pm UTC](https://www.ruby-forum.com/t/load-missing-constant-uninitialized-constant-rails-railt/192446 "2010-07-30T12:47:40Z")

</div>

Hi All, I run rake gems:install rake gems:unpack If i add configure the rspec-rails gem in config/environment.rb: config.gem "rspec-rails", :version =\> "\>= 1.3.2" and then run server. I am getting thi…

---

## [Problem with installing Rails 2.3.8 on Ubuntu 10.04](https://www.ruby-forum.com/t/problem-with-installing-rails-2-3-8-on-ubuntu-10-04/192431)

<div class="topic-metadata">

**Author:** [@Mars\_Cheng](https://www.ruby-forum.com/u/Mars_Cheng)\
**Replies:** 1\
**Last updated:** [July 30, 2010, 11:58am UTC](https://www.ruby-forum.com/t/problem-with-installing-rails-2-3-8-on-ubuntu-10-04/192431 "2010-07-30T11:58:04Z")

</div>

hi, I installed the ruby-full package. After downloading the rubygems 1.3.7, I installed it without any problem. I guess it should have installed relative gems by default, such as activesupport. Any help is appreciat…

---

## [Stupid question about blocks in before\_validation for eg](https://www.ruby-forum.com/t/stupid-question-about-blocks-in-before-validation-for-eg/192419)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 2\
**Last updated:** [July 30, 2010, 11:56am UTC](https://www.ruby-forum.com/t/stupid-question-about-blocks-in-before-validation-for-eg/192419 "2010-07-30T11:56:22Z")

</div>

Hi, I’m hitting a wall in my ruby knowledge. When I have: before\_validation { |object| object.permalink = object.title.parameterize } What’s that { |object| …} thing? It’s a block, ok, but when does it get executed?…

---

## [Testing in template for required attribute](https://www.ruby-forum.com/t/testing-in-template-for-required-attribute/192441)

<div class="topic-metadata">

**Author:** [@Mlle](https://www.ruby-forum.com/u/Mlle)\
**Replies:** 0\
**Last updated:** [July 30, 2010, 11:37am UTC](https://www.ruby-forum.com/t/testing-in-template-for-required-attribute/192441 "2010-07-30T11:37:34Z")

</div>

Is there a way to say in the template Model.required?(attribute) if validates\_presence\_of is used on the attribute?

---

## [Tags not being saved into the database](https://www.ruby-forum.com/t/tags-not-being-saved-into-the-database/192403)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 12\
**Last updated:** [July 30, 2010, 10:56am UTC](https://www.ruby-forum.com/t/tags-not-being-saved-into-the-database/192403 "2010-07-30T10:56:59Z")

</div>

Why am I encountering this situation? I’m using the following code in my article form: \<% form\_for \[:admin, @article\] do |f| %\> \<%= f.error\_messages %\> \<%= f.label "Tags" %\> \<%= select\_tag "tags", "Value …

---

## [Rspec + Callbacks Classes](https://www.ruby-forum.com/t/rspec-callbacks-classes/192386)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 3\
**Last updated:** [July 30, 2010, 10:26am UTC](https://www.ruby-forum.com/t/rspec-callbacks-classes/192386 "2010-07-30T10:26:08Z")

</div>

Hello Friends, I am using rspec for testing my model, and I have used callbacks in my model as things are working as expected on the front end. but when I try to test the application it throws an error. My code. …

---

## [Apn on Rails gem](https://www.ruby-forum.com/t/apn-on-rails-gem/191381)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 6\
**Last updated:** [July 30, 2010, 8:23am UTC](https://www.ruby-forum.com/t/apn-on-rails-gem/191381 "2010-07-30T08:23:11Z")

</div>

Hi, I’m really not sure someone will be able to help me, but I have a problem with apn\_on\_rails. When I follow the exemple on the github page I have an error: device = APN::Device.create(:token =\> “XXXXXXXX XXXXXXX…

---

## [Ruby ORM and other tools for CUBRID Database System](https://www.ruby-forum.com/t/ruby-orm-and-other-tools-for-cubrid-database-system/191952)

<div class="topic-metadata">

**Author:** [@CUBRID](https://www.ruby-forum.com/u/CUBRID)\
**Replies:** 3\
**Last updated:** [July 30, 2010, 7:14am UTC](https://www.ruby-forum.com/t/ruby-orm-and-other-tools-for-cubrid-database-system/191952 "2010-07-30T07:14:42Z")

</div>

Hello, My name is Esen S… I am a developer and a project manager at CUBRID Database Development Team. First, let me briefly introduce CUBRID. It is an free open source relational database management system highly opt…

---

## [Order by not working on all](https://www.ruby-forum.com/t/order-by-not-working-on-all/192406)

<div class="topic-metadata">

**Author:** [@markh](https://www.ruby-forum.com/u/markh)\
**Replies:** 4\
**Last updated:** [July 30, 2010, 5:35am UTC](https://www.ruby-forum.com/t/order-by-not-working-on-all/192406 "2010-07-30T05:35:44Z")

</div>

Car.all.order(“make”) generates an error like “undefined method \`order’ for #Array:0x7fd314476e38” Is this a bug? It seems that it should work. Rails 3.0.0rc.

---

## [Testing authentication with basic\_auth](https://www.ruby-forum.com/t/testing-authentication-with-basic-auth/191275)

<div class="topic-metadata">

**Author:** [@anywho](https://www.ruby-forum.com/u/anywho)\
**Replies:** 4\
**Last updated:** [July 30, 2010, 5:32am UTC](https://www.ruby-forum.com/t/testing-authentication-with-basic-auth/191275 "2010-07-30T05:32:17Z")

</div>

hi, I’ve got an api which is using authenticate\_or\_request\_with\_http\_basic What are you guys using to test this? I’m using rspec, and before I was using rspec-rails, I was using authorize from Rack::Test to do the au…

---

## [How does Rails respond to Ajax with JSON?](https://www.ruby-forum.com/t/how-does-rails-respond-to-ajax-with-json/192424)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 0\
**Last updated:** [July 30, 2010, 1:43am UTC](https://www.ruby-forum.com/t/how-does-rails-respond-to-ajax-with-json/192424 "2010-07-30T01:43:42Z")

</div>

In Ruby on Rails, why = render :json =\> array\_data shows nothing (as seen in Firebug, the GET in the console), but - response.content\_type = "application/json" = render :text =\> array\_data.to\_json shows the data arra…

---

## [Rails 3 RC](https://www.ruby-forum.com/t/rails-3-rc/191840)

<div class="topic-metadata">

**Author:** [@kfmfe04](https://www.ruby-forum.com/u/kfmfe04)\
**Replies:** 60\
**Last updated:** [July 30, 2010, 12:33am UTC](https://www.ruby-forum.com/t/rails-3-rc/191840 "2010-07-30T00:33:00Z")

</div>

What happened to the release???

---

## [Default\_scope in rails 3 with lambda](https://www.ruby-forum.com/t/default-scope-in-rails-3-with-lambda/192417)

<div class="topic-metadata">

**Author:** [@Daniel\_Alejandro\_Ga](https://www.ruby-forum.com/u/Daniel_Alejandro_Ga)\
**Replies:** 0\
**Last updated:** [July 29, 2010, 10:55pm UTC](https://www.ruby-forum.com/t/default-scope-in-rails-3-with-lambda/192417 "2010-07-29T22:55:26Z")

</div>

Hello, i am trying to set a default scope so I can pass a proc as argument. This is the code: default\_scope lambda { where(“language = ?”, I18n.locale.to\_s) } When I try to get the values, the following error is rai…

---

## [Re: how to deal with gender](https://www.ruby-forum.com/t/re-how-to-deal-with-gender/192416)

<div class="topic-metadata">

**Author:** [@Cesar\_Sanz](https://www.ruby-forum.com/u/Cesar_Sanz)\
**Replies:** 0\
**Last updated:** [July 29, 2010, 10:54pm UTC](https://www.ruby-forum.com/t/re-how-to-deal-with-gender/192416 "2010-07-29T22:54:51Z")

</div>

I would use the gender attribute instead of creating a new entity in my model… But it depends on your model design -original message- Subject: \[Rails\] how to deal with gender From: bingo bob removed\_email\_address@dom…

---

## [Migration: updating a column](https://www.ruby-forum.com/t/migration-updating-a-column/192389)

<div class="topic-metadata">

**Author:** [@eric2323223](https://www.ruby-forum.com/u/eric2323223)\
**Replies:** 3\
**Last updated:** [July 29, 2010, 9:56pm UTC](https://www.ruby-forum.com/t/migration-updating-a-column/192389 "2010-07-29T21:56:54Z")

</div>

Hi, Is there a way to “update” a column? Here’s what I mean: I have a column name “item” in table “products” of type “integer” Now I want to update the column to have the option “:null =\> false” So far, the only wa…

---

## [Getting mysql running](https://www.ruby-forum.com/t/getting-mysql-running/192410)

<div class="topic-metadata">

**Author:** [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Replies:** 2\
**Last updated:** [July 29, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/getting-mysql-running/192410 "2010-07-29T21:38:14Z")

</div>

Now need to get MySQL installed. I am having the following trouble installing sudo gem install mysql – --with-mysql-config=/usr/bin/mysql\_config ERROR: Error installing mysql: ERROR: Failed to build gem native exten…

---

## [Paperclip, authlogic and callback issue](https://www.ruby-forum.com/t/paperclip-authlogic-and-callback-issue/192307)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 1\
**Last updated:** [July 29, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/paperclip-authlogic-and-callback-issue/192307 "2010-07-29T18:31:26Z")

</div>

I use authlogic for authentication and paperclip for handling user’s profile picture attachments. I use the following method to get the current\_user def current\_user\_session return @current\_user\_session if defined…

---

## [Version Hell](https://www.ruby-forum.com/t/version-hell/192408)

<div class="topic-metadata">

**Author:** [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Replies:** 8\
**Last updated:** [July 29, 2010, 6:26pm UTC](https://www.ruby-forum.com/t/version-hell/192408 "2010-07-29T18:26:44Z")

</div>

Version hell…I have the latest version of gems installed and gems -v proves this, but somewhere an old copy is hanging about - how do I get rid of this old version? This is driving me nuts! I seem to be getting confli…

---

## [Capistrano - override default, get/copy source from local](https://www.ruby-forum.com/t/capistrano-override-default-get-copy-source-from-local/192257)

<div class="topic-metadata">

**Author:** [@ntk](https://www.ruby-forum.com/u/ntk)\
**Replies:** 4\
**Last updated:** [July 29, 2010, 5:00pm UTC](https://www.ruby-forum.com/t/capistrano-override-default-get-copy-source-from-local/192257 "2010-07-29T17:00:06Z")

</div>

I am working on getting Capistrano running for an app but need to ask it to download source to a local directory and then send it to the deployment server via scp/etc (there are reasons for this I won’t get into). Bel…

---

## [Connection\_pool with\_connection strange behaviour - ActiveRecord 2.3.8](https://www.ruby-forum.com/t/connection-pool-with-connection-strange-behaviour-activerecord-2-3-8/192402)

<div class="topic-metadata">

**Author:** [@pyr0](https://www.ruby-forum.com/u/pyr0)\
**Replies:** 0\
**Last updated:** [July 29, 2010, 4:34pm UTC](https://www.ruby-forum.com/t/connection-pool-with-connection-strange-behaviour-activerecord-2-3-8/192402 "2010-07-29T16:34:55Z")

</div>

I noticed some strange behaviour with connection\_pool.with\_connection and it’s probably because I am not understanding the proper usage. If I call with\_connection, it seems to me that the connection within the block …

---

## [Why no \<meta charset="utf-8" /\> in application.html.erb?](https://www.ruby-forum.com/t/why-no-meta-charset-utf-8-in-application-html-erb/192401)

<div class="topic-metadata">

**Author:** [@johnny](https://www.ruby-forum.com/u/johnny)\
**Replies:** 1\
**Last updated:** [July 29, 2010, 4:33pm UTC](https://www.ruby-forum.com/t/why-no-meta-charset-utf-8-in-application-html-erb/192401 "2010-07-29T16:33:44Z")

</div>

I’m reading “Dive into html5” and in http://diveintohtml5.org/semantics.html#encoding , it says every page should contain , otherwise it’s subject to security vulnerabilities (http:// code.google.com/p/doctype/wiki/A…

---

## [Query builder UI](https://www.ruby-forum.com/t/query-builder-ui/192400)

<div class="topic-metadata">

**Author:** [@edoardoz](https://www.ruby-forum.com/u/edoardoz)\
**Replies:** 0\
**Last updated:** [July 29, 2010, 4:12pm UTC](https://www.ruby-forum.com/t/query-builder-ui/192400 "2010-07-29T16:12:39Z")

</div>

My ror app need a query builder UI + backend hooks to generate simple reports (excel-like). Anybody know a gem/plugin to do so? Regards.

---

## [Dynamic Google Maps](https://www.ruby-forum.com/t/dynamic-google-maps/192015)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 7\
**Last updated:** [July 29, 2010, 3:59pm UTC](https://www.ruby-forum.com/t/dynamic-google-maps/192015 "2010-07-29T15:59:32Z")

</div>

My Rails application (Rails: V 2.1.0, Ruby: V 1.8.6) has on it, the ability for users to submit stories with their address information, which will be atomised into appropriate fields. A front end form allows users to …

---

## [Google map integration](https://www.ruby-forum.com/t/google-map-integration/192325)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [July 29, 2010, 9:42am UTC](https://www.ruby-forum.com/t/google-map-integration/192325 "2010-07-29T09:42:56Z")

</div>

Hi, I am doing a google map integration using “geokit” and “YM4R/GM” plugin. Whenever I am passing the “area name” the it is ,marking that in google map properly. But my client wants whenever user adds the “IT Compan…

---

## [Whyhtml.erb generate a html structure not like it should be?](https://www.ruby-forum.com/t/whyhtml-erb-generate-a-html-structure-not-like-it-should-be/192370)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [July 29, 2010, 8:47am UTC](https://www.ruby-forum.com/t/whyhtml-erb-generate-a-html-structure-not-like-it-should-be/192370 "2010-07-29T08:47:42Z")

</div>

the HTML.ERB like this, and then it generate a html, it. the indent not it shoud be, and the second also indent not the noraml. why it generate a html like that? second, I think everytme I should check empty object…

---

## [Want to get original url from short(i.e tiny,bit.ly etc) url](https://www.ruby-forum.com/t/want-to-get-original-url-from-short-i-e-tiny-bit-ly-etc-url/192375)

<div class="topic-metadata">

**Author:** [@preksha](https://www.ruby-forum.com/u/preksha)\
**Replies:** 0\
**Last updated:** [July 29, 2010, 8:06am UTC](https://www.ruby-forum.com/t/want-to-get-original-url-from-short-i-e-tiny-bit-ly-etc-url/192375 "2010-07-29T08:06:04Z")

</div>

Hi all, I am using Expurrel gem to get the original url from the short url for all the url shortener services.It works good on the script/console and irb but it is throughing me error like “URI::InvalidURIError in Ke…

---

## [Creating routes at run-time](https://www.ruby-forum.com/t/creating-routes-at-run-time/192312)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 4\
**Last updated:** [July 29, 2010, 4:07am UTC](https://www.ruby-forum.com/t/creating-routes-at-run-time/192312 "2010-07-29T04:07:55Z")

</div>

Hey guys. In Rails 2, is there a way to create a route at run-time? I want to do this because a gem that I’m writing requires a single resource route, and I’d prefer that the gem create it at run-time instead of forci…

---

## [How to determine the running controller in rails3](https://www.ruby-forum.com/t/how-to-determine-the-running-controller-in-rails3/192360)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 0\
**Last updated:** [July 29, 2010, 1:46am UTC](https://www.ruby-forum.com/t/how-to-determine-the-running-controller-in-rails3/192360 "2010-07-29T01:46:51Z")

</div>

The @controller and @template are returning nil in rails3. What is the proper way to refer to the current controller in rails3? Cheers.

---

## [Las Vegas Ruby & Rails meetup](https://www.ruby-forum.com/t/las-vegas-ruby-rails-meetup/192358)

<div class="topic-metadata">

**Author:** [@nuby2ruby](https://www.ruby-forum.com/u/nuby2ruby)\
**Replies:** 2\
**Last updated:** [July 29, 2010, 12:20am UTC](https://www.ruby-forum.com/t/las-vegas-ruby-rails-meetup/192358 "2010-07-29T00:20:26Z")

</div>

Hey everyone, The Las Vegas Ruby community (very very small) is trying to get some more people. Engine Y. is now sponsoring us. If you plan on being in Vegas, or are currently living here, and want to join our communi…

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

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