similar to: is there a way to run a obj.each loop in the script/console?

Displaying 20 results from an estimated 70000 matches similar to: "is there a way to run a obj.each loop in the script/console?"

2009 Jan 08
5
There is already an object named 'schema_migrations' in the database
I''ve created a table in a SQL Server database using a migration, successfully. I''ve tried to change the name of a column in the table and got the error message above when running ''rake db:migrate''. Previously I have developed using MySQL and Sqlite and migrations have worked successfully. This is an error I have not seen before. Has anybody seen this and worked
2008 Jan 14
5
Help finding "JRE" to run Netbeans in Linux
I''ve spent the last year developing a large Ruby on Rails 2.0 application with over a 100 tables and controllers and hope to be deploying it soon. Before I moved from my Windows XP computer to deployment, I wanted to run it in a local Linux environment to sort out: 1. Amazon S3 files 2. RMagick (went south when I upgraded to Rails 2.0) 3. ARMailer (mail spooling program) I''ve
2009 Oct 23
10
Rspec Tutorial
Hi Everybody, Greetings!! I want to use rspec for my applications. Please guide me with the Rspec tutorial. I want a good example to start with. Please help me by providing good tutorials on Rspec to start with. I actually followed the example from http://rspec.info Please guide me on more examples. Waiting for your reply. --~--~---------~--~----~------------~-------~--~----~ You received
2009 Apr 05
5
Use a value from a different model
Hello, I cannot find the issue and it drives me crazy :( let''s simplify. I have 2 models: saving and purchase_type a *saving* corresponds to a *purchase_type* e.g. new sourcing or renegotiation a saving has exactly one purchase_type and a purchase_type has many savings. when I try to display the list of savings and their purchase type (name, not Id), i get the dreaded "You have a
2008 Oct 12
4
Re-using crontrollers with non-http requests
Hi! I am creating a application that does a lot of background processing. For this I am using a queue (starling in my case...) and several pollers that will get a message from the queue and execute some code corresponding do it. The code that these pollers process looks a lot like some code in methods included in some of my rails application controllers. I wanted to DRY this a little bit, so I
2009 Jun 05
15
Rails Code Indentation
Hi All, Rails code must be readable, formatted and well indented. I wanted to do indent code in my previous projects. Is there any built in rails plugin/gem that can help me to indent my existing code. Any ideas will be really appreciated ! NOTE: Please don''t suggest editor plugins. Thanks & Regards, Sandip R~ -- Ruby on Rails Developer http://sandip.sosblog.com
2010 Mar 04
25
how to share variables in data migrations (up/down)
hi there, How do we share variables in a given data migration? For example, the code below fails to work because "statuses" don''t seem to be in scope for both up and down. class AddDefaultValuesToStatuses < ActiveRecord::Migration statuses = [ { ''details'' => ''details'', }, {
2008 Oct 06
8
.htaccess rewrite
can someone help me with an .htaccess rewrite? i''m trying to convert all requests to "/?spot=8888" to be "/locations/ 888". thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 Oct 12
15
We're sorry, but something went wrong on Tomcat
I am using JRuby and I have to deploy on Tomcat. My web app is working fine in the dev envirmonment, with Mongel, but when I deploy on Tomcat I get "We''re sorry, but something went wrong on Tomcat". The problem is that production.log only shows: # Logfile created on Mon Oct 12 12:54:36 +0100 2009-bash-3.00 The file permission and directory are 777. Any idea how I can
2008 Sep 23
6
No css formatting
I''ve just moved a rails site across to a test server from my development PC. I''ve frozen rails and put all the relevant gems into the vendor/gems directory too. I''ve migrated the mysql database and configured Apache with Phusion Passenger. I can access the site and the content is fine. The formatting however, has disappeared - it''s as though the css file does
2009 Jun 23
3
Starting ruby script on server's reboot
Hi I''m using passenger + apache. with this combination, how can I start my ruby script on server''s reboot? now I type "ruby myscript.rb run" whenever server reboot.
2009 Apr 05
3
Error reverting back to a previous version of rails
I want to revert back to a previous version of rails (1.2.3) but the project I want to work on was created in 2.0.2. I have uninstalled 2.0.2 and gem installed 1.2.3 but when I run script\server I get the following error. (I''m guessing its to do with my environment file but I''m pretty new to Rails so Im not sure.)
2009 Feb 18
14
guides on css strategy
I''m having to design the UI to a small site, and that means dabbling in css. I''ve never been able to get any kind of decent idea as to how to decide on classes and id-ing. I''ve had a sniff around the internet without success: people seem to be as clueless as me. I''ve even examined the css/markup of a few sites and it hasn''t been enlightening. Does
2008 Jan 01
26
Did DHH have a suit on?
So I''m wondering about the origin of "ActiveRecord" and "ActionPack" and the like in Rails. I''ve always thought that perhaps DHH found himself in a suit one day (maybe he had to attend a friend''s wedding or something), and as long as he had the suit on, decided to lapse into a one of the barely lucid frenzies that Marketing people are prone to when
2008 Apr 26
8
Online credit card processing
What''s a good way to process credit cards from our Rails application? I like PayPal because of it''s name recognition but I don''t like the fact that the user must leave our site; we are hoping for a tightly integrated look-and-feel. We might also offer both, PayPal and our own major credit card processing (see attached example screen shot). I''ve heard of other
2010 Jul 02
17
Doesn't work erb engine
I''m new in RoR:) I have controller and view (/app/controllers/greeting_controller.rb and /app/views/greeting/index.rhtml /.erb/.html.erb - doesn''t match). greeting_controller.rb source: class GreetingController < ApplicationController def index @message = "Hello world!" end end index.rhtml source: <html>
2010 Sep 16
6
acts_as_solr plugin fate?
Just wanted to see if I was using the latest acts_as_solr plugin, but the URL <http://acts_as_solr.railsfreaks.com/> takes me to a GoDaddy domain parking page. Anyone know what''s happened to railsfreaks, and more particularly this plugin? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- You received this
2008 Jan 12
6
php proxy exists?
Wondering if anyone''s heard of a php script that will ''forward'' your requests on to, say, a mongrel instance, and return it? Kind of a php fcgi? Thoughts? Thanks. -Roger -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2009 Dec 23
4
html parser / assertions in a model
I am using http.get in a model to parse html code returned from a Oracle server. My first try was to use assertions (assert and assert_select) to test and parse the html code. But I have problems including the methods in the model. Have tried both "include" and copy/paste to get assertion methods into my model. Works as a model, but I get load errors when I am using the model from a
2008 Oct 16
4
InstantRails and SQLite
Hy, I''m using InstantRails for my RoR developments and it is really great. However I have a little problem since a few days. Here is the situation, I''m using InstantRails 2.0 with PHP 5.2.6 (I upgraded following the InstantRails procedure). I''m using MySQL as a database for my application but recently downloaded a forum (FluxBB) which need SQLite to work. My problem is