Displaying 20 results from an estimated 100000 matches similar to: "where to put database loading method?"
2007 Dec 29
0
(unknown)
NAME
bj
SYNOPSIS
bj (migration_code|generate_migration|migrate|setup|plugin|run|
submit|list|set|config|pid) [options]+
HISTORY
1.0.0:
- use full path to ruby for plugin mode
- plugin correctly installs bin -->> script
- plugin install uses --force
- properly quote paths in windows (spaces)
- switch win signal to ABRT (was INT)
- background job
2008 Feb 22
1
Port listening, cron jobs and loading rails environment
Hi,
As part of a web application that I am writing I need to have something
listening for any packets that are received on a particular port and
then process the packets using some of my Rails models, hence I start
the script via the ./script/runner command.
This script always needs to be running, if it exits for any reason, I
need it to start up again very quickly. Hence, I was considering
2006 Nov 29
1
actionmailer on Debian Etch
Hello,
I have two debian etch systems, both have rails. I have installed them
with apt, not gems. No problems so far.
Now I have tried to use the actionmailer. The results:
mage@miranda:~/temp$ rails mailer
create
create app/controllers
[....]
create log/test.log
mage@miranda:~/temp$ cd mailer
mage@miranda:~/temp/mailer$ script/generate mailer Letter test send
2008 Apr 26
1
Best cron job method for email notifications?
There are so many ways to do cron jobs in Rails (Backgroundrb, script/
runner, etc.) but I am wondering what would be the best to use in
production, just for sending out email/SMS notifications? For example,
an email automatically gets sent a day before the due date of a
project milestone.
Thanks for the help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because
2011 Feb 07
0
Error loading rubygems
Hi,
During an operation (rspec related) that required loading rubygems
(from config/boot.rb file) I got the following error message:
~/config/boot.rb:1:in `require'': no such file to load -- rubygems
(LoadError)
~/config/boot.rb:1
from ~/config/application.rb:1:in `require''
from ~/config/application.rb:1
from ~/config/environment.rb:2:in `require''
from
2006 Dec 28
3
NET::IMAP / Runner problems
Hello,
I have a runner script that is meant to check a mailbox using imap and
insert them into the application. The method I am using to do this was
taken directly off the rails wiki:
require ''net/imap'' # above the class, not within it
def self.check_mail
imap = Net::IMAP.new(''localhost'')
imap.authenticate(''LOGIN'',
2007 Jul 04
2
timeout error
Hallo,
I am donig a rather long script execution via script/runner (quering a
xmlrpc webservice).
After about 5 minutes the execution stops raising the following error.
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/runner.rb:47: /
usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'': execution expired
(Timeout::Error)
from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout''
2008 Jan 15
6
SQLite concurrency, SQLite3::BusyException
I am currently experiencing concurrency issues after moving from MySQL
to SQLite.
My original program worked fined using MySQL but is now returning
"SQLite3::BusyException" errors. The same result happens whether or
not I enable the allow_concurrency flag.
If I do manually acquire a lock on the SQLite DB the problem would
disapear, but I thought that rails was supposed to handle this
2008 Oct 02
1
acts_as_taggable_on environment issues
Like most people, I''ve got two machines: one for development and one
for production. I''ve done everything I can to make sure the ruby/rails
environments are the same, but of course they''re not identical (I''ll
get into that in a moment). The error that I''m getting happens when I
call a method in a background task controller on the production
machine; I
2007 Jun 07
0
Module Not Loaded by script/runner
Hello ~
I have a Model Action that I wish to call from script/runner. This
Model accesses another action in a module in the lib directory. If I
fire up script/console and execute Model.action it works perfectly,
but when I run the command via script/runner it cannot find the action
I want to call in my module.
If I run: script/runner "puts $:" The lib directory is shown, so the
2008 Apr 22
2
syntax error in runner.rb
ruby script/runner ''load "filename.rb"''*
fails with
./script/../config/../vendor/rails/railties/lib/commands/runner.rb:47:
(eval):1: compile error (SyntaxError)
Rails version is 1.2.0 on Linux
Any clues on what could be incorrect?
Thanks!
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message
2009 Jan 21
5
Runner suddenly fails...
I have some jobs running through cron jobs and runner that suddenly
starts failing.
This is how it looks:
from
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/commands/runner.rb:47
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require''
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require''
from
2008 Dec 01
1
Undefined method "full_description" when trying to run "rake spec"
Hello guys,
I''m getting this weird error when trying to run the specs using "rake spec":
/home/mauricio/NetBeansProjects/talkies/vendor/rails/actionpack/lib/action_controller/test_process.rb:471:in
`method_missing'': undefined method `full_description'' for
#<Spec::Rails::Example::ControllerExampleGroup::Subclass_73::Subclass_9:0x7f5fdca4a810>
2007 Oct 04
1
PUT- or POST-ing xml
I''d like to write a test of a REST service wherein XML is submitted as the
request entity.
In Test::Unit on Rails, this seems to be possible in an integration test,
but not in a functional test. RSpec uses the Rails functional test
framework, as far as I can tell, so it suffers the same result; it tries to
symbolize the keys of the ''parameters'' hash, except the
2009 Mar 21
0
Problem running Rdoc from Rake in Rails 2.3
People,
I''m getting an error from Rake I''d like to debug. Here is a
screendump:
Fri Mar 20 23:28 /b/tmp/myfc23 maco$ rake doc:plugins:rspec
(in /b/tmp/myfc23)
rdoc -o doc/plugins/rspec --title ''Rspec Plugin Documentation'' --line-
numbers --inline-source --charset utf-8 -T html vendor/plugins/rspec/
lib/autotest/discover.rb
major-snip
95% [107/112]
2007 Oct 10
2
RSpec seems to be having a hard time loading Helper classes
I am getting the error when I run the command: rake spec
This is a new project with not current test written besides the ones
auto-created for me.
+++++++++
$ rake spec
(in /Users/chrisolsen/Projects/Rails/chrisolsen/trunk)
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in
`load_missing_constant'': uninitialized constant ProjectsHelper
2011 May 20
3
"no such file to load -- rails/commands/runner (LoadError)"
Hi,
I am using ruby 1.9.2 and rails 3 for my application.
I have written a bash script which I want to run in cron.
If I directly run the bash file it runs. If I run it through the cron I
get the following error:-
"/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'': no such file to load -- rails/commands/runner (LoadError)
from
2007 Mar 08
2
Rendering a view from a model
Hi peoples.
I have the following class method in a Rails model, in which I retrieve
some objects from the DB...
@bubbles = Bubble.find(:all, :limit => 30) # What is the limit?
open( "public/xml_data/main_data_feed.xml", "w" ) { | l | l.write
ERB.new( IO.read( File.join( RAILS_ROOT,
"app/views/rssfeed/bubbles.rhtml" ) ) ).result }
When I attempt to run this
2008 Sep 03
1
edge rails config.cache_classes = true breaks applications
when using current edge rails, i am getting trouble when using the
production environment -- i tracked down the problem to the following
line
config.cache_classes = true
if i disable the class caching, everything works just fine, when
enabling the cache_classes, lots of errors get dropped -- see the output
below:
error #1:
2007 Apr 12
1
rspec on rails: undefined method ''controller_name''
Im trying to write a controller spec, but when I run it I get an error like
the one below.
I found Bug6707
(http://rubyforge.org/pipermail/rspec-devel/2007-March/002147.html
), but I get the error no matter how I run the spec
( whether I use rake or not)
Any ideas?
I am using 0.8.2
The Error:
C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/expectati
ons/sugar.rb:14:in