# Rails

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

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

---

## [HELP i think i just lost my database forever!](https://www.ruby-forum.com/t/help-i-think-i-just-lost-my-database-forever/140908)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 12\
**Last updated:** [June 20, 2008, 6:27am UTC](https://www.ruby-forum.com/t/help-i-think-i-just-lost-my-database-forever/140908 "2008-06-20T06:27:58Z")

</div>

I accidentally ran rake by itself and it started shooting a bunch of things across the screen and erased my database data! I think it’s because i have prod, dev, and test all pointing to the same database. I though…

---

## [Need help to installe ROR on my server](https://www.ruby-forum.com/t/need-help-to-installe-ror-on-my-server/140927)

<div class="topic-metadata">

**Author:** [@real](https://www.ruby-forum.com/u/real)\
**Replies:** 4\
**Last updated:** [June 20, 2008, 6:08am UTC](https://www.ruby-forum.com/t/need-help-to-installe-ror-on-my-server/140927 "2008-06-20T06:08:22Z")

</div>

i’m new to Ruby on Rails. I would like to try it. I have a windows server 2003. What do i need to install ? Thanks Real Drouin removed\_email\_address@domain.invalid

---

## [Functional tests and attachment\_fu](https://www.ruby-forum.com/t/functional-tests-and-attachment-fu/140957)

<div class="topic-metadata">

**Author:** [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Replies:** 0\
**Last updated:** [June 20, 2008, 5:51am UTC](https://www.ruby-forum.com/t/functional-tests-and-attachment-fu/140957 "2008-06-20T05:51:24Z")

</div>

Hi, I am trying to get my functional tests for an attachment\_fu resource to pass, and I’ve been able to get the tests for create method to pass, but I cannot get the destroy method to pass (I am using a fixture), bec…

---

## [Javascript manipulation of models?](https://www.ruby-forum.com/t/javascript-manipulation-of-models/140950)

<div class="topic-metadata">

**Author:** [@vshyam121](https://www.ruby-forum.com/u/vshyam121)\
**Replies:** 1\
**Last updated:** [June 20, 2008, 5:05am UTC](https://www.ruby-forum.com/t/javascript-manipulation-of-models/140950 "2008-06-20T05:05:44Z")

</div>

Hi, I need to know how to make a new model using user generated input about the name of the model and the schema. I’m fairly new to ror, so I don’t even know if it’s possible. My friend said you can do this using pro…

---

## [DRYer way to see if array exists before I do a find?](https://www.ruby-forum.com/t/dryer-way-to-see-if-array-exists-before-i-do-a-find/140823)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [June 20, 2008, 4:03am UTC](https://www.ruby-forum.com/t/dryer-way-to-see-if-array-exists-before-i-do-a-find/140823 "2008-06-20T04:03:10Z")

</div>

Many times I perform logic where I look to gather an array of records, but first must check to see if any exists (so I don’t get an error of a .nil array). Here is an example of some code I wrote to today, is there a …

---

## [Nginx/mongrel with multiple machine deployment](https://www.ruby-forum.com/t/nginx-mongrel-with-multiple-machine-deployment/140905)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 4\
**Last updated:** [June 20, 2008, 3:33am UTC](https://www.ruby-forum.com/t/nginx-mongrel-with-multiple-machine-deployment/140905 "2008-06-20T03:33:43Z")

</div>

I am in the process of migrating an app that currently resides on a single hardware server (running pound, nginx as an asset host, memcached, mongrel and mysql) to a new group of xen virtual machines: an appserver run…

---

## [Rails 2.1 w/MS SQL Server 2008 warning re: ":lock option"](https://www.ruby-forum.com/t/rails-2-1-w-ms-sql-server-2008-warning-re-lock-option/140863)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [June 20, 2008, 1:53am UTC](https://www.ruby-forum.com/t/rails-2-1-w-ms-sql-server-2008-warning-re-lock-option/140863 "2008-06-20T01:53:14Z")

</div>

All, I’m successfully running my 2.1 app. against MS SQL Server 2008. One of my actions generated these messages, though: Warning: SQLServer :lock option ‘nil’ not supported It doesn’t appear to hurt anything, but I…

---

## [Canceling Email in the ActionMailer Model](https://www.ruby-forum.com/t/canceling-email-in-the-actionmailer-model/140857)

<div class="topic-metadata">

**Author:** [@Mozmonkey](https://www.ruby-forum.com/u/Mozmonkey)\
**Replies:** 2\
**Last updated:** [June 20, 2008, 1:49am UTC](https://www.ruby-forum.com/t/canceling-email-in-the-actionmailer-model/140857 "2008-06-20T01:49:36Z")

</div>

On my site I’m adding a feature to let users to turn off email notifications for certain things. I want to add the code which checks these preferences in my ActionMailer model and stop the delivery process if the use…

---

## [Having trouble extending Date](https://www.ruby-forum.com/t/having-trouble-extending-date/140925)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 7\
**Last updated:** [June 20, 2008, 1:40am UTC](https://www.ruby-forum.com/t/having-trouble-extending-date/140925 "2008-06-20T01:40:47Z")

</div>

Hi all, I need to extend the Date class. Or more accurately, the ActiveSupport::CoreExtensions::date::Calculations module. Everything works fine when I include the new method in that module itself. But when I try…

---

## [FormOption Helper for Group Select](https://www.ruby-forum.com/t/formoption-helper-for-group-select/140443)

<div class="topic-metadata">

**Author:** [@stevel](https://www.ruby-forum.com/u/stevel)\
**Replies:** 2\
**Last updated:** [June 20, 2008, 1:06am UTC](https://www.ruby-forum.com/t/formoption-helper-for-group-select/140443 "2008-06-20T01:06:54Z")

</div>

I am trying to generate the Form Select with the OPTGROUP tags, from a simple array. For example I have an array : \[Acer, laptop, 1\], \[Acer, monitor, 2\], \[HP, desktop, 3\], \[HP, printer,4\] I know how to use the Select …

---

## [Multiple deploy scripts](https://www.ruby-forum.com/t/multiple-deploy-scripts/140800)

<div class="topic-metadata">

**Author:** [@Slant](https://www.ruby-forum.com/u/Slant)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/multiple-deploy-scripts/140800 "2008-06-19T23:35:19Z")

</div>

I’m taking over a project and am wanting to put a staging server in place. The thing holding me up is the Capistrano deploy scripts. I have changed the ‘deploy.rb’ file to ‘deploy-production.rb’ and then added a ‘de…

---

## [Has\_one belongs\_to update woes](https://www.ruby-forum.com/t/has-one-belongs-to-update-woes/140939)

<div class="topic-metadata">

**Author:** [@luke](https://www.ruby-forum.com/u/luke)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/has-one-belongs-to-update-woes/140939 "2008-06-19T23:22:54Z")

</div>

Hi, I’m using 2 models, Machine which has\_one MachineDetail (which belongs\_to Machine). Machine is a table of computers, MachineDetail has a foreign key machine\_id, and is used to add some additional information abou…

---

## [How to use SQL without a model?](https://www.ruby-forum.com/t/how-to-use-sql-without-a-model/140904)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 6\
**Last updated:** [June 19, 2008, 11:11pm UTC](https://www.ruby-forum.com/t/how-to-use-sql-without-a-model/140904 "2008-06-19T23:11:18Z")

</div>

I want to do a SQL query, but I haven’t created a model. For example, instead of Car.find(:all) I want to be able to use SELECT \* from cars. I don’t have a Car model because this DB was not created with Rails (it’s fr…

---

## [White-labeling - config.plugins-fu fails in Rails 2.1](https://www.ruby-forum.com/t/white-labeling-config-plugins-fu-fails-in-rails-2-1/140938)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/white-labeling-config-plugins-fu-fails-in-rails-2-1/140938 "2008-06-19T23:05:12Z")

</div>

What I’m trying to do is to enumerate all available plugins and then exclude specific plugins. This allows me to white-label my site and load the necessary brand via plugin specified in the environment at run-time. …

---

## [Any news about swfupload & sessions?](https://www.ruby-forum.com/t/any-news-about-swfupload-sessions/140901)

<div class="topic-metadata">

**Author:** [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/any-news-about-swfupload-sessions/140901 "2008-06-19T22:49:52Z")

</div>

Hi all, I’m up to rewrite my swfupload code as a plugin (as far as possible). My actual solution to the old problem with session handling and flash was to ignore it, send an upload\_request to the server, get back some …

---

## [Object Task at episode 74 of railscasts](https://www.ruby-forum.com/t/object-task-at-episode-74-of-railscasts/140774)

<div class="topic-metadata">

**Author:** [@Israel\_G](https://www.ruby-forum.com/u/Israel_G)\
**Replies:** 7\
**Last updated:** [June 19, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/object-task-at-episode-74-of-railscasts/140774 "2008-06-19T21:42:00Z")

</div>

Hi. In the episode 74 http://railscasts.com/episodes/74, Ryan has a model “project” that can have many “tasks”, and he uses link\_to\_function to dynamically add a field in the form for a new Task. In order to do tha…

---

## [Capistrano db:load:schema \<= acting funny](https://www.ruby-forum.com/t/capistrano-dbschema-acting-funny/140919)

<div class="topic-metadata">

**Author:** [@nameth](https://www.ruby-forum.com/u/nameth)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/capistrano-dbschema-acting-funny/140919 "2008-06-19T21:42:00Z")

</div>

two servers, one for WEB, one for DB. cap deploy:cold runs without errors, and clones the repository onto both servers. then through capistrano task in deploy.rb to load schema to the db using cap deploy:load\_schema. …

---

## [Why can't I access Webrick web server from other computers?](https://www.ruby-forum.com/t/why-cant-i-access-webrick-web-server-from-other-computers/140921)

<div class="topic-metadata">

**Author:** [@xianese](https://www.ruby-forum.com/u/xianese)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/why-cant-i-access-webrick-web-server-from-other-computers/140921 "2008-06-19T21:35:08Z")

</div>

Hi everyone, I have a rails project running on Ubuntu. When I ran it on localhost http://localhost:3000, it worked perfectly. But when I tried to access from other computers in the same network by either http://hostna…

---

## [Uploads & nginx/mongrel with multiple machine deployment](https://www.ruby-forum.com/t/uploads-nginx-mongrel-with-multiple-machine-deployment/140916)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/uploads-nginx-mongrel-with-multiple-machine-deployment/140916 "2008-06-19T21:10:11Z")

</div>

I am in the process of migrating an app that currently resides on a single hardware server (running pound, nginx as an asset host, memcached, mongrel and mysql) to a group of xen virtual machines: an appserver running…

---

## [Undefined method \`has\_attachment'](https://www.ruby-forum.com/t/undefined-method-has-attachment/140923)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/undefined-method-has-attachment/140923 "2008-06-19T21:09:36Z")

</div>

Any ideas what could cause this error: undefined method \`has\_attachment’ The server has been restarted. I’ve used this plugin before (and from the exact same repo) and haven’t had this problem before. I’ve searched g…

---

## [Kind of a complex find :order](https://www.ruby-forum.com/t/kind-of-a-complex-find-order/140780)

<div class="topic-metadata">

**Author:** [@differenthink](https://www.ruby-forum.com/u/differenthink)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/kind-of-a-complex-find-order/140780 "2008-06-19T20:51:21Z")

</div>

Hi, i ve got two models, “Question” and “Answer” A “question” can have many “answers”, or none. I want to order my questions by answers date or question date if it has no answer, i tried to do that : Question.find…

---

## [Quotes cause SQL havoc](https://www.ruby-forum.com/t/quotes-cause-sql-havoc/140912)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/quotes-cause-sql-havoc/140912 "2008-06-19T20:02:56Z")

</div>

Hi- I cannot seem to find an answer to this. I have a simple question with quotes- I want to allow apostrophes in a string in a model. I then want to allow searching on that field. In ActiveRecord, when I create a…

---

## [Anybody know a prototype helper that creates a popup window?](https://www.ruby-forum.com/t/anybody-know-a-prototype-helper-that-creates-a-popup-window/140548)

<div class="topic-metadata">

**Author:** [@ron](https://www.ruby-forum.com/u/ron)\
**Replies:** 5\
**Last updated:** [June 19, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/anybody-know-a-prototype-helper-that-creates-a-popup-window/140548 "2008-06-19T19:14:28Z")

</div>

Hi, I’m trying to get a form to open up in a new window. I know how to toggle divs but haven’t been able to find anything on how to get another window to open…any ideas? Ron

---

## [SQLite3 Error Transitioning to 2.0](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 5\
**Last updated:** [June 19, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/sqlite3-error-transitioning-to-2-0/140814 "2008-06-19T17:49:41Z")

</div>

I’m transitioning to Rails 2.0. Under 2.0 setting up a database appears to be even easier than it was under 1.x. In fact, it appears to be almost trivial. So, I’m wondering why I am having trouble. I’m using the d…

---

## [Has\_many belongs\_to foreign key question](https://www.ruby-forum.com/t/has-many-belongs-to-foreign-key-question/140894)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/has-many-belongs-to-foreign-key-question/140894 "2008-06-19T17:48:07Z")

</div>

i have a 2 tables ITEMS id name attribute\_id attribute\_secondary\_id ATTRIBUTES id name what i am trying to do is have attribute\_id and attribute\_secondary\_id both link to the ATTRIBUTES tables. At the moment a…

---

## [Strange REST routing problem using sortable\_element. Please Help!](https://www.ruby-forum.com/t/strange-rest-routing-problem-using-sortable-element-please-help/140858)

<div class="topic-metadata">

**Author:** [@criscrasp](https://www.ruby-forum.com/u/criscrasp)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/strange-rest-routing-problem-using-sortable-element-please-help/140858 "2008-06-19T17:46:53Z")

</div>

Hi, I’m having a very strange problem using a AJAX sortable list containing images for articles. I tried a lot of things and searched for hours but I don’t find the reason. I would really appreciate your help. Please…

---

## [File.new text writing securtiy issue](https://www.ruby-forum.com/t/file-new-text-writing-securtiy-issue/140903)

<div class="topic-metadata">

**Author:** [@oshuma](https://www.ruby-forum.com/u/oshuma)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 5:36pm UTC](https://www.ruby-forum.com/t/file-new-text-writing-securtiy-issue/140903 "2008-06-19T17:36:51Z")

</div>

Ok so I’m working on a project that stores a number of users details and their associated mailing lists then after all edits writes all the .ali files to a directory. I’m using the following code as a test of file.new…

---

## [Does anyone know why the plugin enum-column doesn't work within a partial?](https://www.ruby-forum.com/t/does-anyone-know-why-the-plugin-enum-column-doesnt-work-within-a-partial/140902)

<div class="topic-metadata">

**Author:** [@walksalong](https://www.ruby-forum.com/u/walksalong)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/does-anyone-know-why-the-plugin-enum-column-doesnt-work-within-a-partial/140902 "2008-06-19T17:24:55Z")

</div>

I can call enum-column just find within the main form, but if i have a partial that contains form elements and i try to call enum-column i get NoMethodError. Thanks

---

## [How to setup a Session and use its data from other classes?](https://www.ruby-forum.com/t/how-to-setup-a-session-and-use-its-data-from-other-classes/140855)

<div class="topic-metadata">

**Author:** [@shaselai](https://www.ruby-forum.com/u/shaselai)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/how-to-setup-a-session-and-use-its-data-from-other-classes/140855 "2008-06-19T16:34:07Z")

</div>

I am trying to do an authentication where I have : session\[“User”\] = User.authenticate(@params\[“name”\], @params\[“password”\]) and the program continues on if the authentication is correct. Now if later on in the sessi…

---

## [Plugin to copy data from related has\_one model](https://www.ruby-forum.com/t/plugin-to-copy-data-from-related-has-one-model/140832)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/plugin-to-copy-data-from-related-has-one-model/140832 "2008-06-19T15:53:13Z")

</div>

Hi, this is my first post, so nice to meet you all and thanks in advance for your help. I have a “task” model that has it’s own CRUD interface, and can get “promoted” to another model, that is, it gets associated with…

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

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