# Rails

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

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

---

## [How to return current host or domain?](https://www.ruby-forum.com/t/how-to-return-current-host-or-domain/148041)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 6\
**Last updated:** [September 8, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/how-to-return-current-host-or-domain/148041 "2008-09-08T17:56:48Z")

</div>

Hi, Is there a simple function in Rails that will return the current host or domain? Like if I was running on http://localhost:3000, is there a function that would return “localhost”? And if I was on the live server…

---

## [Thin server recently started hanging](https://www.ruby-forum.com/t/thin-server-recently-started-hanging/147983)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 7\
**Last updated:** [September 8, 2008, 5:39pm UTC](https://www.ruby-forum.com/t/thin-server-recently-started-hanging/147983 "2008-09-08T17:39:10Z")

</div>

I have been running nginx/thin for about a month now with no issues. For some reason today my first thin server on port 3000 has been sucking up all the cpu and a lot of memory and if you try a make a web request it e…

---

## [Comment.user associations with acts\_as\_commentable](https://www.ruby-forum.com/t/comment-user-associations-with-acts-as-commentable/133111)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 3\
**Last updated:** [September 8, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/comment-user-associations-with-acts-as-commentable/133111 "2008-09-08T16:19:27Z")

</div>

I’m using acts\_as\_commentable and running in to a problem when trying to access objects associated with the comment.user. For example: My app has groups, and a group belongs to a user. If I write group.user.comments, …

---

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

<div class="topic-metadata">

**Author:** [@elmy-liddiard](https://www.ruby-forum.com/u/elmy-liddiard)\
**Replies:** 5\
**Last updated:** [September 8, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/find-by-sql-parameters/147819 "2008-09-08T15:46:02Z")

</div>

I am trying to run a pair of sql statements with the second using a value form the first’s returned data set but can figure out the syntax. @risks returns the values I would expect but @changes gets no returned data o…

---

## [Helper method with block--with list iteration?](https://www.ruby-forum.com/t/helper-method-with-block-with-list-iteration/148037)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/helper-method-with-block-with-list-iteration/148037 "2008-09-08T15:41:50Z")

</div>

I’d like to use the helper method with block technique, but I can’t seem to make it work the way I want with a list. I’m imagining something like this: \<% decorate\_list\_with\_max(list, 5) do |item| %\> Here’s the item …

---

## [Store test data into the testing database using rspec](https://www.ruby-forum.com/t/store-test-data-into-the-testing-database-using-rspec/148023)

<div class="topic-metadata">

**Author:** [@sadasivam](https://www.ruby-forum.com/u/sadasivam)\
**Replies:** 3\
**Last updated:** [September 8, 2008, 2:34pm UTC](https://www.ruby-forum.com/t/store-test-data-into-the-testing-database-using-rspec/148023 "2008-09-08T14:34:50Z")

</div>

Hi, I have problem storing the values into the test databse. so that i can’t cross check the values in the database.

---

## [Problems with datetime\_select](https://www.ruby-forum.com/t/problems-with-datetime-select/148029)

<div class="topic-metadata">

**Author:** [@Folivi\_FOLLY](https://www.ruby-forum.com/u/Folivi_FOLLY)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/problems-with-datetime-select/148029 "2008-09-08T13:53:40Z")

</div>

Hello,i have a little problem in using the datetime\_select object the order statement does not work (no sorting) and i don’t know how to get de attributes when the form iss validated thanks

---

## [Handling checkbox in rails?](https://www.ruby-forum.com/t/handling-checkbox-in-rails/148025)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 1\
**Last updated:** [September 8, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/handling-checkbox-in-rails/148025 "2008-09-08T13:48:21Z")

</div>

Dear all, I have a doubt in using checkbox in my task? I have used four check box for selecting multiple options while adding a new record. Like, \<%= check\_box("upload", :selected =\> @selected) %\> \<%= check\_b…

---

## [Head of Interactive - New Job Opportunity](https://www.ruby-forum.com/t/head-of-interactive-new-job-opportunity/148027)

<div class="topic-metadata">

**Author:** [@jonny](https://www.ruby-forum.com/u/jonny)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/head-of-interactive-new-job-opportunity/148027 "2008-09-08T13:44:49Z")

</div>

I am an IT recruitment consultant and my client is looking for a experienced developer to head up their busy team working on a variety of challenging interactive projects. The successful candidate will be leading the…

---

## [ActiveRecord::StatementInvalid Error](https://www.ruby-forum.com/t/activerecord-statementinvalid-error/148028)

<div class="topic-metadata">

**Author:** [@mohdanas](https://www.ruby-forum.com/u/mohdanas)\
**Replies:** 1\
**Last updated:** [September 8, 2008, 1:43pm UTC](https://www.ruby-forum.com/t/activerecord-statementinvalid-error/148028 "2008-09-08T13:43:03Z")

</div>

Hi There, I’m gettings the following errors while accessing my application. Can someone please tell what is the possible cause and can it be resolved. " ActiveRecord::StatementInvalid in Site#showalladdress Showing…

---

## [Time slow by one hour](https://www.ruby-forum.com/t/time-slow-by-one-hour/148021)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 2\
**Last updated:** [September 8, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/time-slow-by-one-hour/148021 "2008-09-08T13:32:14Z")

</div>

Hi, In my application I have to correct the time stamp on event discussion posts. Perhaps they are not observing DST? In any case, they are slow by one hour. how to do this ? I have following type of code :- \<%= fr…

---

## [Group By / Filters with UltraSphinx](https://www.ruby-forum.com/t/group-by-filters-with-ultrasphinx/148024)

<div class="topic-metadata">

**Author:** [@florian95](https://www.ruby-forum.com/u/florian95)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 12:56pm UTC](https://www.ruby-forum.com/t/group-by-filters-with-ultrasphinx/148024 "2008-09-08T12:56:18Z")

</div>

Hi, I use last version of UltraSphinx but filters dont work… In my model : is\_indexed :fields =\> \[‘content’, ‘titre’, ‘created\_at’, {:field =\> ‘lang’, :facet =\> true, :as =\> ‘lang’}\], :delta =\> true or is\_indexed…

---

## [Full path of a uploaded file](https://www.ruby-forum.com/t/full-path-of-a-uploaded-file/148015)

<div class="topic-metadata">

**Author:** [@shaily903](https://www.ruby-forum.com/u/shaily903)\
**Replies:** 2\
**Last updated:** [September 8, 2008, 12:22pm UTC](https://www.ruby-forum.com/t/full-path-of-a-uploaded-file/148015 "2008-09-08T12:22:50Z")

</div>

hi I am trying to get the “Full path of a uploaded file” . In my view I am using file\_field to upload a file. Below is my view code Select a CSV File : \<%= f.file\_fi…

---

## [How do I make an API?](https://www.ruby-forum.com/t/how-do-i-make-an-api/147944)

<div class="topic-metadata">

**Author:** [@Charles\_Ju](https://www.ruby-forum.com/u/Charles_Ju)\
**Replies:** 8\
**Last updated:** [September 8, 2008, 10:55am UTC](https://www.ruby-forum.com/t/how-do-i-make-an-api/147944 "2008-09-08T10:55:25Z")

</div>

Hi! I’m a new developer trying to get into Ruby on Rails. My team is developing an iPhone application that wants to call our Ruby on Rails web-end to store and retrieve data. I’ve looked on the web and in this forum …

---

## [New to rails](https://www.ruby-forum.com/t/new-to-rails/147992)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 2\
**Last updated:** [September 8, 2008, 10:28am UTC](https://www.ruby-forum.com/t/new-to-rails/147992 "2008-09-08T10:28:09Z")

</div>

I am new to rails. Which user guide is better for rails beginner? Could you give me some suggestion to learn rails? thanks

---

## [Can Rails work without database?](https://www.ruby-forum.com/t/can-rails-work-without-database/147995)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 4\
**Last updated:** [September 8, 2008, 10:16am UTC](https://www.ruby-forum.com/t/can-rails-work-without-database/147995 "2008-09-08T10:16:03Z")

</div>

I’ve gone through some tutorials and found that every example they made defines a Database. I wander can Rails work without database.

---

## [RubyGems requesting win32/service on Red Hat Linux](https://www.ruby-forum.com/t/rubygems-requesting-win32-service-on-red-hat-linux/147796)

<div class="topic-metadata">

**Author:** [@gers32](https://www.ruby-forum.com/u/gers32)\
**Replies:** 1\
**Last updated:** [September 8, 2008, 9:19am UTC](https://www.ruby-forum.com/t/rubygems-requesting-win32-service-on-red-hat-linux/147796 "2008-09-08T09:19:42Z")

</div>

Hi, I successfully installed a RoR/Flex/Oracle application in a Windows environment and am now in the process of trying the same in Linux. Unfortunately, when I get to the part where I start Mongrel, I get the follow…

---

## [Keystroke commands](https://www.ruby-forum.com/t/keystroke-commands/148008)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 9:16am UTC](https://www.ruby-forum.com/t/keystroke-commands/148008 "2008-09-08T09:16:46Z")

</div>

I wanted to bind keystroke commands to actions, and the way that I was doing that was inelegant enough that I’m sure I’m missing something. The actions in question are also accessible via buttons on the page; two of t…

---

## [:collection](https://www.ruby-forum.com/t/collection/148004)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [September 8, 2008, 9:16am UTC](https://www.ruby-forum.com/t/collection/148004 "2008-09-08T09:16:46Z")

</div>

Hi I am calling the following from the problem controller @problem=Problem.find(params\[:id\]) MailSendingProblem.send\_mail\_to\_group\_owner(group\_id.to\_i,@problem) and inside the def send\_mail\_to\_group\_owner ProblemMa…

---

## [Error trying to save DateTime object in DataBase](https://www.ruby-forum.com/t/error-trying-to-save-datetime-object-in-database/147775)

<div class="topic-metadata">

**Author:** [@mrbrett](https://www.ruby-forum.com/u/mrbrett)\
**Replies:** 3\
**Last updated:** [September 8, 2008, 9:12am UTC](https://www.ruby-forum.com/t/error-trying-to-save-datetime-object-in-database/147775 "2008-09-08T09:12:40Z")

</div>

Hello I am having trouble with datetime objects, I had the “good” idea of making a form, asking for the parameters of DateTime and then give this object to the Database, apparently this is not the way. I have this err…

---

## [DateTime conditional for RSS parser](https://www.ruby-forum.com/t/datetime-conditional-for-rss-parser/148007)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 9:03am UTC](https://www.ruby-forum.com/t/datetime-conditional-for-rss-parser/148007 "2008-09-08T09:03:28Z")

</div>

I’ve been struggling with an adjustment to a rss parsesr (a freelancer built the feature, I’m a newbie working on my own app). The parser needs a conditional which means it will only parse new posts in a feed if they …

---

## [RubyGems requesting win32/service on Red Hat Linux](https://www.ruby-forum.com/t/rubygems-requesting-win32-service-on-red-hat-linux/147897)

<div class="topic-metadata">

**Author:** [@gers32](https://www.ruby-forum.com/u/gers32)\
**Replies:** 2\
**Last updated:** [September 8, 2008, 8:55am UTC](https://www.ruby-forum.com/t/rubygems-requesting-win32-service-on-red-hat-linux/147897 "2008-09-08T08:55:06Z")

</div>

Hi, I successfully installed a RoR/Flex/Oracle application in a Windows environment and am now in the process of trying the same in Linux. Unfortunately, when I get to the part where I start Mongrel, I get the follow…

---

## [Redirecting both http://xxx and http://www to one uniform UR](https://www.ruby-forum.com/t/redirecting-both-http-xxx-and-http-www-to-one-uniform-ur/148006)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 8:34am UTC](https://www.ruby-forum.com/t/redirecting-both-http-xxx-and-http-www-to-one-uniform-ur/148006 "2008-09-08T08:34:14Z")

</div>

Hi, I observed that http://xyz.com and http://www.xyz.com don’t use the same session ID. If i log in using URL http://xyz.com and then on adjacent tab if i type in URL with www appended, then it creates one more new …

---

## [Reaper is not restarting mongrel with the latest release path? (but rather an earlier releases path](https://www.ruby-forum.com/t/reaper-is-not-restarting-mongrel-with-the-latest-release-path-but-rather-an-earlier-releases-path/147999)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 7:22am UTC](https://www.ruby-forum.com/t/reaper-is-not-restarting-mongrel-with-the-latest-release-path-but-rather-an-earlier-releases-path/147999 "2008-09-08T07:22:32Z")

</div>

Hi, I’ve tracked my “cap deploy” problems down to the fact that (at least with the unix user I’ve created for use with capistrano) when “script/process/reaper” is run, whilst it restarts the ruby process the resultin…

---

## [Changing Date Format - it works, but then I get a "uninitialized constant ActiveSupport"](https://www.ruby-forum.com/t/changing-date-format-it-works-but-then-i-get-a-uninitialized-constant-activesupport/147987)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [September 8, 2008, 4:01am UTC](https://www.ruby-forum.com/t/changing-date-format-it-works-but-then-i-get-a-uninitialized-constant-activesupport/147987 "2008-09-08T04:01:59Z")

</div>

Hi, When I change date formats via the following entry in environments.rb it works fine. Web pages reflect the new date format. “ActiveSupport::CoreExtensions::date::Conversions::DATE\_FORMATS\[:default\]” The issue is…

---

## [Rake gems:install requires the gems it tries to install](https://www.ruby-forum.com/t/rake-gems-install-requires-the-gems-it-tries-to-install/146809)

<div class="topic-metadata">

**Author:** [@philipp07](https://www.ruby-forum.com/u/philipp07)\
**Replies:** 7\
**Last updated:** [September 8, 2008, 3:02am UTC](https://www.ruby-forum.com/t/rake-gems-install-requires-the-gems-it-tries-to-install/146809 "2008-09-08T03:02:49Z")

</div>

Hi, I’m having a problem with rake gems:install on ubuntu hardy with rubygems 1.2 installed from source. I have the following gem requirements in my environment.rb: Required GEMs config.gem ‘crypt’, :version =\> ‘1.1.…

---

## [\[ANN\] assert\_latest now takes "polygamous" arguments](https://www.ruby-forum.com/t/ann-assert-latest-now-takes-polygamous-arguments/147984)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 2:48am UTC](https://www.ruby-forum.com/t/ann-assert-latest-now-takes-polygamous-arguments/147984 "2008-09-08T02:48:47Z")

</div>

Railsters: Those of you who dig ActiveRecord need this: It shows how to write tests like this: t, fz = assert\_latest T2, Foo do T2.create 2.times{ Foo.create } end assert do t.id…

---

## [Trying to create a folder dir in rails](https://www.ruby-forum.com/t/trying-to-create-a-folder-dir-in-rails/147981)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 1\
**Last updated:** [September 8, 2008, 2:23am UTC](https://www.ruby-forum.com/t/trying-to-create-a-folder-dir-in-rails/147981 "2008-09-08T02:23:38Z")

</div>

Hello IM trying to create a folder directory based on when the user signs up and is created Im using restful Authencation and the code i added to the create methos is this… Dir.mkdir"/public/midifiles/#{current\_user.i…

---

## [Having Trouble Matching A Blank Line In TextMate Bundle Editor](https://www.ruby-forum.com/t/having-trouble-matching-a-blank-line-in-textmate-bundle-editor/147982)

<div class="topic-metadata">

**Author:** [@Wyatt\_G](https://www.ruby-forum.com/u/Wyatt_G)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 2:17am UTC](https://www.ruby-forum.com/t/having-trouble-matching-a-blank-line-in-textmate-bundle-editor/147982 "2008-09-08T02:17:47Z")

</div>

I couldn’t find the Ruby on Rails: TextMate group (did it go away?) so I’m posting my question here. I’m creating my own custom language syntax for TextMate. In the bundle editor I’m setting up folding like this: fo…

---

## [Rake gems](https://www.ruby-forum.com/t/rake-gems/147980)

<div class="topic-metadata">

**Author:** [@Nik\_B](https://www.ruby-forum.com/u/Nik_B)\
**Replies:** 0\
**Last updated:** [September 8, 2008, 2:00am UTC](https://www.ruby-forum.com/t/rake-gems/147980 "2008-09-08T02:00:15Z")

</div>

I’ve upgraded to Rails 2.1.0, I have rake version 0.8.1, and I have rubygems version 1.2.0. I’ve tried to use the gem dependency feature in Rails 2.1, but when I try the new rake gems task, I get " Don’t know how to b…

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

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