Displaying 20 results from an estimated 10000 matches similar to: "Automated operations on a database"
2006 Jun 19
4
share model definition
I want to share everything about a model except the db connection. Is
this a reasonable way to do it?
module NotebookDefinition
--
Posted via http://www.ruby-forum.com/.
2009 May 11
3
daemons load activesupport 2.2.2 instead of 2.1.0, causing failure
Hi,
I have a couple of daemons that im trying to setup to be run for my
app. The environment load is as follows..
ENV["RAILS_ENV"] ||= "development"
require File.join(File.dirname(__FILE__), "/../../config/environment")
And the error I get is
#<LoadError: no such file to load -- active_support>
#<Gem::Exception: can''t activate activesupport (=
2006 Feb 08
8
Strategies for Unit testing 2 databases
Hi,
My application spans 2 (or more) databases for some very specific
reasons... My models are working fine, even dynamically establishing
connections as needed at runtime, and spanning relationships across the
databases (which really impressed me). The problem is, I can''t seem to
force Units for these models (that use a secondary db) to load their
fixtures into and use the
2008 Jan 25
2
strange capistrano problem
When trying to start ferret with capistrano, I keep getting this:
$ cap services:ferret:stop
domain [redken.digitalpulp.com] :
user [john] :
* executing `services:ferret:stop''
* executing "cd /srv/rails/redken/current; script/ferret_server -e
production stop"
servers: ["redken.digitalpulp.com"]
Password:
[redken.digitalpulp.com] executing command
***
2006 Jan 16
2
Basic (newbie) Webrick / ssl config question
I have a simple Intranet app I want to make accessible via the
Internet for remote access by our employees.
I want to use ssl (https) connections and I''ve found enough messages
to imply Webrick as included in rails can do the job.
The message at
http://wrath.rubyonrails.org/pipermail/rails/2005-January/001993.html
even appears to tell me exactly how to do it by modifying
2009 Jul 31
6
Background daemon
It''s sending e-mail every hour, but I changed to sleep for a day, but
keep send the e-mail by hour. I don''t know what to do to send daily.
Could somebody help me?
thanks
############
# mailer.rb
###############
#!/usr/bin/env ruby
# You might want to change this
ENV["RAILS_ENV"] ||= "production"
require File.dirname(__FILE__) +
2009 Apr 07
4
/lib daemon folder: how do i add a module into the daemon?
I am using the daemons plugin.
I have just one problem how do i add modules from the /lib folder to
the /lib/daemons/daemon.rb file
eg. /lib/basic_functions.rb
this is the file i want to load in daemon.rb
contents daemon.rb:
#!/usr/bin/env ruby
# You might want to change this
ENV["RAILS_ENV"] ||= "production"
require File.dirname(__FILE__) +
2008 Oct 06
10
Uninitialized constant Spec:Story
Hi, I''m fairly new to Rails and v. new to RSpec. Think it looks pretty
useful and so I''m trying it out for the first time. I have installed the
rspec-rails gem and created a simple plain text my_story file and
my_story.rb file along the lines described here -
http://www.tomtenthij.co.uk/2008/1/25/rspec-plain-text-story-runner-on-a-fresh-rails-app.
When I run
2008 Apr 15
2
environment.rb uninitialized constant when starting console
I have the following code in environment.rb:
require File.join(File.dirname(__FILE__), ''boot'')
raw_config = File.read(RAILS_ROOT + "/config/config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV]
This works fine when running the server, but if I try and start a
console I get:
Loading development environment.
2006 May 25
3
Behavior Change in Scripts since 1.1?
Occasionally we need to run scripts (such as from cron) that have access
to the rails environment.
Since we''ve upgraded to 1.1 (I believe it coincides with that), all of
our scripts seem to run as unit tests.
An example (obviously useless), which would be store in the script
directory:
------BEGIN CODE----------------------------
RAILS_ENV = ''development''
require
2006 May 22
3
Syntax error when running dispatch.cgi
Hi,
when I execute dispatch.cgi at the command line, I get the following
error message:
[cg@cg rails]$ ./public/dispatch.cgi
./public/dispatch.cgi:3:in `require'':
./public/../config/environment.rb:8: syntax error, unexpected ''<''
(SyntaxError)
<%= ''# '' if freeze %>RAILS_GEM_VERSION = ''<%= Rails::VERSION::STRING %>''
2006 Mar 04
2
Using the rails configuration outside rails
I have a ruby class that will be used sometimes from within rails, and
sometimes from without (not in the context of a running rails application).
It will reference models within the rails app, and It may be run manually,
or may be scheduled via Cron (though I may look at RailsCron as well). I''ve
seen help on the Wiki for using models outside of Rails (like this
2006 Aug 11
1
Calling a Controller method from the command line
Hi All,
I need to run some reports via cron. I know I can use runner and call
a method in a model class. But I''d really like to use templates and
IMO this kind of logic belongs in a controller anyways.
These are periodic reports so I don''t need nor want to leave a server
running all the time, so getting the data via curl/wget isn''t really
an option.
What I really
2008 Mar 17
8
should have_tag outside Rails
Hi
Google has not helped me here. I''m looking for a way to use the have_tag
assert_select wrapper outside RSpec on Rails (but in a Rails project) so I
can use it to check text strings.
Has anyone managed this?
Thanks
Ashley
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2009 Mar 19
6
[Cucumber 0.2] Failure to use should
I have a step definition like this:
Then "the account should be created" do
account = Account.find_by_name("my shiny new account")
p account.class
account.should_not be_blank
end
When running this step, I got the error message:
Account(id: integer, name: string, state: string, next_renewal_at: date,
created_at: datetime, updated_at: datetime, full_domain: string,
2006 Feb 01
3
apache2 / fcgi / RoR - no connection
Hi,
I''ve generated a new Rails app and dummy controller "foo" with method
"hello". I am trying to run it under Apache/2.0.53 with fastcgi, and
getting the index.html page when I hit http://localhost/foo/hello, or
for any other request (http://localhost/kdjfslkfjs). Also, there is
nothing in the rails logs, and no errors in the apache logs.
Relevant bit of
2007 Nov 15
5
What command to run all stories?
Hi, I''ve been following this thread and I can get the example stories
to run with the ruby command. But I''ve been unable to get the example
from http://blog.davidchelimsky.net/articles/2007/10/25/plain-text-stories-part-iii
to run with all.rb
ruby stories/all.rb
/home/edh/story/stories/additions/steps/addition_steps.rb:2: undefined
method `steps_for'' for main:Object
2006 Oct 09
1
error running 'ruby script/console' => "uninitialized constant RAILS_ROOT" ??
Hi,
Anyone suggest why when I try to run the console via ''ruby script/console'' I
get the following "uninitialized constant RAILS_ROOT" ??
Error:
================================
V:\Source\testapp>ruby script\console
Loading development environment.
./script/../config/../config/environment.rb:3:NameError: uninitialized
constant RAILS_ROOT
2006 Apr 16
7
Problem running unit tests
I am running Rails 1.1.2 with Ruby 1.82-15. My database is Postgresql. I
haven''t had any problems generating models, migrations, using scaffolds, and
generally building and using my application, but I haven''t been able to get
testing to work. I initially just ignored the problem and kept developing,
but would like to add proper testing from here on out.
Currently when I type
2007 Sep 18
2
FW: Specifying spec and output format inline?
Anyone have any advice on this one?
Thanks,
Adam
________________________________
From: rspec-users-bounces at rubyforge.org
[mailto:rspec-users-bounces at rubyforge.org] On Behalf Of Adam Reed
Sent: Monday, September 17, 2007 2:14 PM
To: rspec-users at rubyforge.org
Subject: [rspec-users] Specifying spec and output format inline?
Howdy from Austin, TX.
I''m new to rspec, and am