# Rails

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

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

---

## [In \`activate': can't activate aionpack (= 1.13.6, runtime)](https://www.ruby-forum.com/t/in-activate-cant-activate-aionpack-1-13-6-runtime/149160)

<div class="topic-metadata">

**Author:** [@jkadarusman](https://www.ruby-forum.com/u/jkadarusman)\
**Replies:** 8\
**Last updated:** [September 22, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/in-activate-cant-activate-aionpack-1-13-6-runtime/149160 "2008-09-22T18:08:03Z")

</div>

Hi, I am trying to run my test cases and everytime I will get the following errors: c:/ruby/lib/ruby/site\_ruby/1.8/rubygems.rb:142:in \`activate’: can’t activate a ionpack (= 1.13.6, runtime), already activated actio…

---

## [Find\_by\_sql issues](https://www.ruby-forum.com/t/find-by-sql-issues/149210)

<div class="topic-metadata">

**Author:** [@bskaggs](https://www.ruby-forum.com/u/bskaggs)\
**Replies:** 9\
**Last updated:** [September 22, 2008, 5:55pm UTC](https://www.ruby-forum.com/t/find-by-sql-issues/149210 "2008-09-22T17:55:49Z")

</div>

im trying to use find\_by\_sql, i think its a very useful function, but im having trouble using it. in my outcomes table i have: id status 1 pass 2 fail 3 pass 4 pass in my controller im try…

---

## [IRB won't work](https://www.ruby-forum.com/t/irb-wont-work/149218)

<div class="topic-metadata">

**Author:** [@MCMCMC](https://www.ruby-forum.com/u/MCMCMC)\
**Replies:** 2\
**Last updated:** [September 22, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/irb-wont-work/149218 "2008-09-22T16:33:19Z")

</div>

I am a newb. Running OS X leopard. Installed ruby, rails, mysql through macports. Everything works fine except today I tried to run the irb console. I get the following: computer: mark$ ruby script/console Loading de…

---

## [Blocks using concat do not work inside helper](https://www.ruby-forum.com/t/blocks-using-concat-do-not-work-inside-helper/110218)

<div class="topic-metadata">

**Author:** [@art](https://www.ruby-forum.com/u/art)\
**Replies:** 1\
**Last updated:** [September 22, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/blocks-using-concat-do-not-work-inside-helper/110218 "2008-09-22T16:15:29Z")

</div>

Hi, I wrote this ticket yesterday and it had been deleted and marked as invalid http://dev.rubyonrails.org/ticket/9066 Ticket: When I try to do this from a helper: def foo(&block) concat “ ”, block.binding yield …

---

## [Accessing validation information from the controller](https://www.ruby-forum.com/t/accessing-validation-information-from-the-controller/149217)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/accessing-validation-information-from-the-controller/149217 "2008-09-22T16:06:05Z")

</div>

Hi, Is there any way to access the validation information in a model from the controller? For example, to change the regular expression in a validates\_format\_of :name, :with =\> %r{^(A-Za-z){1,40}$} dynamically, or t…

---

## [New app - where to start](https://www.ruby-forum.com/t/new-app-where-to-start/149216)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/new-app-where-to-start/149216 "2008-09-22T15:58:11Z")

</div>

Well not quite new, and not quite a fresh start. I’m just wondering what people think is a good way in general to manage the content of a site. I mean, I appreciate you can generate a view and start typing but is ther…

---

## [New form ends up in index](https://www.ruby-forum.com/t/new-form-ends-up-in-index/149214)

<div class="topic-metadata">

**Author:** [@marcus](https://www.ruby-forum.com/u/marcus)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 3:54pm UTC](https://www.ruby-forum.com/t/new-form-ends-up-in-index/149214 "2008-09-22T15:54:24Z")

</div>

I have a problem with a form. When i submit it when running mongrel it works great and it send the post-request to the create action, but when i run it through fastcgi the post request ends up as a get request to the …

---

## [Rails and HTML 4.01 (not XHTML)](https://www.ruby-forum.com/t/rails-and-html-4-01-not-xhtml/106406)

<div class="topic-metadata">

**Author:** [@hdante](https://www.ruby-forum.com/u/hdante)\
**Replies:** 2\
**Last updated:** [September 22, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/rails-and-html-4-01-not-xhtml/106406 "2008-09-22T15:39:59Z")

</div>

Hi, I’ve tried to change my layouts to HTML 4.01 DOCTYPE, but then the page didn’t pass w3 validation. Validation fails in the line that corresponds to the following: \<%= stylesheet\_link\_tag “depot”, :media =\> “all” …

---

## [Hello good eve to all](https://www.ruby-forum.com/t/hello-good-eve-to-all/149199)

<div class="topic-metadata">

**Author:** [@Sathiya](https://www.ruby-forum.com/u/Sathiya)\
**Replies:** 1\
**Last updated:** [September 22, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/hello-good-eve-to-all/149199 "2008-09-22T15:17:38Z")

</div>

how the form validation in rubyonrails and how to retrieve the image from database and how to upload the image in rubyon rails

---

## [Controller level variables](https://www.ruby-forum.com/t/controller-level-variables/149172)

<div class="topic-metadata">

**Author:** [@Jaikishan](https://www.ruby-forum.com/u/Jaikishan)\
**Replies:** 2\
**Last updated:** [September 22, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/controller-level-variables/149172 "2008-09-22T15:17:00Z")

</div>

Hello, I am new to ruby and I want to know how can I define a variable whose scope is restricted to a particular controller. Scenario: What I am trying to achieve is this - based on the parameters specified by user,…

---

## ['require frameworks' : no such file to load --active\_resource (Runtime Error)](https://www.ruby-forum.com/t/require-frameworks-no-such-file-to-load-active-resource-runtime-error/149205)

<div class="topic-metadata">

**Author:** [@rockeyfernando](https://www.ruby-forum.com/u/rockeyfernando)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/require-frameworks-no-such-file-to-load-active-resource-runtime-error/149205 "2008-09-22T15:09:25Z")

</div>

My project was working fine on local machine. For uploading this project on hosting server (shared hosting, no direct access of terminal). I freezed gems on local machine. I also run : “rake rails:update” on command …

---

## [How to generate this request with NET::HTTP](https://www.ruby-forum.com/t/how-to-generate-this-request-with-net-http/149158)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 6\
**Last updated:** [September 22, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/how-to-generate-this-request-with-net-http/149158 "2008-09-22T14:54:59Z")

</div>

Hi, Whith NET::HTTP.post\_form how can I generate the next request? POST /script.php?op=publish HTTP/1.1 … … ch=0&cnt=something When I use: res = Net::HTTP.post\_form(URI.parse(‘XXX Sex - Free Porn Videos at XXX.c…

---

## [Extract a substring](https://www.ruby-forum.com/t/extract-a-substring/149153)

<div class="topic-metadata">

**Author:** [@jef](https://www.ruby-forum.com/u/jef)\
**Replies:** 6\
**Last updated:** [September 22, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/extract-a-substring/149153 "2008-09-22T14:21:13Z")

</div>

hi I have a string: my\_string=“blablablablasubstringblabla” I need to extract the sentence beetween “” and “\</ coordinates\>” How can I do that? Thanks for your help JF

---

## [Auto\_discovery\_link\_tag generating an href tag](https://www.ruby-forum.com/t/auto-discovery-link-tag-generating-an-href-tag/149188)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 4\
**Last updated:** [September 22, 2008, 1:33pm UTC](https://www.ruby-forum.com/t/auto-discovery-link-tag-generating-an-href-tag/149188 "2008-09-22T13:33:02Z")

</div>

For some obscure reason, \<%= auto\_discovery\_link\_tag %\> generates the following html code: This is wrong html. Where does the problem come from? Bug from Rails 2.1.0?

---

## [Ccreating methods on the fly / counting distinct field values](https://www.ruby-forum.com/t/ccreating-methods-on-the-fly-counting-distinct-field-values/149192)

<div class="topic-metadata">

**Author:** [@pat.turner](https://www.ruby-forum.com/u/pat.turner)\
**Replies:** 1\
**Last updated:** [September 22, 2008, 1:15pm UTC](https://www.ruby-forum.com/t/ccreating-methods-on-the-fly-counting-distinct-field-values/149192 "2008-09-22T13:15:58Z")

</div>

Hi, I’m pretty new to ruby and rails, so apologies if this has been covered before (I couldn’t find a thread on it). I want to retrieve a count of records held in the DB for every distinct value of an attribute. E.g…

---

## [Problem with attachment\_fu and ImageScience](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135)

<div class="topic-metadata">

**Author:** [@Victor\_Hahn](https://www.ruby-forum.com/u/Victor_Hahn)\
**Replies:** 4\
**Last updated:** [September 22, 2008, 11:51am UTC](https://www.ruby-forum.com/t/problem-with-attachment-fu-and-imagescience/149135 "2008-09-22T11:51:21Z")

</div>

Hi, I’m having trouble getting the attachment\_fu plugin to generate thumbnails. I’m using ImageScience and everything worked flawlessly on my laptop, but on the deployment server no thumbnails are being generated. Bo…

---

## [Rspec problem stubbing with ActiveRecord assiociations](https://www.ruby-forum.com/t/rspec-problem-stubbing-with-activerecord-assiociations/149121)

<div class="topic-metadata">

**Author:** [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Replies:** 3\
**Last updated:** [September 22, 2008, 11:38am UTC](https://www.ruby-forum.com/t/rspec-problem-stubbing-with-activerecord-assiociations/149121 "2008-09-22T11:38:22Z")

</div>

Hi everybody, my name is Olaf, I’m living in Berlin and this is my first post. I’m quite new to rpsec, so please forgive my Newbieness! I’ve a problem stubbing a simple update action in a controller. I use a little ha…

---

## [Is there anyway to embed log info into response?](https://www.ruby-forum.com/t/is-there-anyway-to-embed-log-info-into-response/149177)

<div class="topic-metadata">

**Author:** [@soliiid](https://www.ruby-forum.com/u/soliiid)\
**Replies:** 2\
**Last updated:** [September 22, 2008, 11:06am UTC](https://www.ruby-forum.com/t/is-there-anyway-to-embed-log-info-into-response/149177 "2008-09-22T11:06:35Z")

</div>

hello everyone, I am looking for a way to embed log info into response, so that it can be displayed directly in View for debugging. any solution?

---

## [To submodule or not to submodule? That is the question](https://www.ruby-forum.com/t/to-submodule-or-not-to-submodule-that-is-the-question/147077)

<div class="topic-metadata">

**Author:** [@Dejan\_D](https://www.ruby-forum.com/u/Dejan_D)\
**Replies:** 5\
**Last updated:** [September 22, 2008, 11:06am UTC](https://www.ruby-forum.com/t/to-submodule-or-not-to-submodule-that-is-the-question/147077 "2008-09-22T11:06:34Z")

</div>

I would like to hear your opinion on using git submodule vs. plugin install.

---

## [Open Source Social Networking](https://www.ruby-forum.com/t/open-source-social-networking/149183)

<div class="topic-metadata">

**Author:** [@saurabhbhatia](https://www.ruby-forum.com/u/saurabhbhatia)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 11:05am UTC](https://www.ruby-forum.com/t/open-source-social-networking/149183 "2008-09-22T11:05:58Z")

</div>

Hi All, We have relesed the Source code for One of our Social Networking Sites, Freely downloadable for Public. Although it is in an Older Rails version, it can be a lot of Help to everyone.There are bugs but not th…

---

## [Finding Listings that Belong to Categories](https://www.ruby-forum.com/t/finding-listings-that-belong-to-categories/149144)

<div class="topic-metadata">

**Author:** [@recreant](https://www.ruby-forum.com/u/recreant)\
**Replies:** 1\
**Last updated:** [September 22, 2008, 10:10am UTC](https://www.ruby-forum.com/t/finding-listings-that-belong-to-categories/149144 "2008-09-22T10:10:45Z")

</div>

I have two models that are playing nicely together. The first is the Category model that uses acts\_as\_tree to create a hierarchy of categories based on parent\_id. Example: Category 1 Sub 1 Sub 2 Subsub 1 Subsubsub…

---

## [Searching for multiple possible values](https://www.ruby-forum.com/t/searching-for-multiple-possible-values/149178)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 3\
**Last updated:** [September 22, 2008, 9:37am UTC](https://www.ruby-forum.com/t/searching-for-multiple-possible-values/149178 "2008-09-22T09:37:47Z")

</div>

Hi, I’m trying to do an search for multiple possible values in one database field. I have an array and want to find any of the values in the array in the database and return the results. So basically arr = \[‘item1’…

---

## [Variables visible in all actions in a controller](https://www.ruby-forum.com/t/variables-visible-in-all-actions-in-a-controller/149176)

<div class="topic-metadata">

**Author:** [@Jaikishan\_J](https://www.ruby-forum.com/u/Jaikishan_J)\
**Replies:** 2\
**Last updated:** [September 22, 2008, 9:20am UTC](https://www.ruby-forum.com/t/variables-visible-in-all-actions-in-a-controller/149176 "2008-09-22T09:20:13Z")

</div>

Hello, I want make a variable visible to all actions in a controller. Everytime user submits a parameter “school\_class\_id” on the basis of which I assign a variable which I want to make available to all the actions i…

---

## [Writing a functional test and checking render :text](https://www.ruby-forum.com/t/writing-a-functional-test-and-checking-render-text/149174)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 1\
**Last updated:** [September 22, 2008, 9:05am UTC](https://www.ruby-forum.com/t/writing-a-functional-test-and-checking-render-text/149174 "2008-09-22T09:05:33Z")

</div>

Can anyone solve a mystery for me? What “assert” can I use to check against render :text?

---

## [Filename protection (encryption)?](https://www.ruby-forum.com/t/filename-protection-encryption/149171)

<div class="topic-metadata">

**Author:** [@nik](https://www.ruby-forum.com/u/nik)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 8:46am UTC](https://www.ruby-forum.com/t/filename-protection-encryption/149171 "2008-09-22T08:46:12Z")

</div>

Hello, I am allowing people to upload their videos. But I am afraid that people can “guess” the filename and just manually download/see them by including it in the URL http://dns/FileNotBelongingToMe.mov How does on…

---

## [Nested-layouts](https://www.ruby-forum.com/t/nested-layouts/148994)

<div class="topic-metadata">

**Author:** [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Replies:** 1\
**Last updated:** [September 22, 2008, 7:10am UTC](https://www.ruby-forum.com/t/nested-layouts/148994 "2008-09-22T07:10:20Z")

</div>

This plugin was broken by Rails 2.1.1, and I’ve fixed it up and put it online at http://github.com/radar/nested-layouts. This is just a heads- up to anyone using nested-layouts in their project and considering upgradi…

---

## [Troubles with Flex Image plugin](https://www.ruby-forum.com/t/troubles-with-flex-image-plugin/149165)

<div class="topic-metadata">

**Author:** [@maep](https://www.ruby-forum.com/u/maep)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 5:58am UTC](https://www.ruby-forum.com/t/troubles-with-flex-image-plugin/149165 "2008-09-22T05:58:25Z")

</div>

Hi! I am learning to use rails, and I want to use Fleximage plugin. But I can’t see how nice it is, because I can’t make it work. So, what i have… model “account” with blob field “image\_file\_data”, account acts\_as\_fl…

---

## [ActionMailer with Google Apps](https://www.ruby-forum.com/t/actionmailer-with-google-apps/149164)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 5:55am UTC](https://www.ruby-forum.com/t/actionmailer-with-google-apps/149164 "2008-09-22T05:55:40Z")

</div>

I am trying to send email from a Google Apps account. Without specifying an settings whatsoever, when attempting to send email, my postfix server will simply relay the request to google, which I assume is much slower …

---

## [Controller issue with plurals](https://www.ruby-forum.com/t/controller-issue-with-plurals/148968)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 5\
**Last updated:** [September 22, 2008, 5:50am UTC](https://www.ruby-forum.com/t/controller-issue-with-plurals/148968 "2008-09-22T05:50:05Z")

</div>

I have a controller named main and it’s mapped through routes.rb when I link to “main\_path” I get this error: uninitialized constant MainsController I tried creating a MainsController and mapping that but didn’t seem …

---

## [Return ID after create (rails 2.1)](https://www.ruby-forum.com/t/return-id-after-create-rails-2-1/149163)

<div class="topic-metadata">

**Author:** [@grayson](https://www.ruby-forum.com/u/grayson)\
**Replies:** 0\
**Last updated:** [September 22, 2008, 5:25am UTC](https://www.ruby-forum.com/t/return-id-after-create-rails-2-1/149163 "2008-09-22T05:25:52Z")

</div>

I’m using a Flex app to post to a controller called segments using the url http://localhost:3000/segments and am able to successfully create the record in AR. However the block of code that should return the ID of th…

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

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