Hi,
I''m running a cron job to parse some RSS feeds. When running the
following
from the terminal everything works as expected:
antrover:~/Sway/Projects/mi7/trunk/mi7 dave$ script/runner -e development "
GetRssData.find_and_parse"
Loaded suite script/runner
Started
Finished in 0.001333 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
However, when setting up the cron job:
*/20 * * * * ~/Sway/Projects/mi7/trunk/mi7/script/runner -e development "
GetRssData.find_and_parse"
I get the following RMagick error:
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/railties/lib/commands/runner.rb:27:
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:147:in
`require'': No such file to load -- RMagick (MissingSourceFile)
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:147:in
`require''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/plugins/file_column/lib/validations.rb:95:in
`validates_image_size''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../app/models/member.rb:125
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:140:in
`load''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:140:in
`load''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:56:in
`rails_pre_engines_require_or_load''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/plugins/engines/lib/engines/dependencies_extensions.rb:60:in
`rails_1_1_require_or_load''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/plugins/engines/lib/engines/dependencies_extensions.rb:14:in
`require_or_load''
... 11 levels...
from /Users/dave/Sway/Projects/mi7/trunk/mi7/script/runner:3:in
`eval''
from
/Users/dave/Sway/Projects/mi7/trunk/mi7/script/../config/../vendor/rails/railties/lib/commands/runner.rb:27
from /Users/dave/Sway/Projects/mi7/trunk/mi7/script/runner:3:in
`require''
from /Users/dave/Sway/Projects/mi7/trunk/mi7/script/runner:3
Why is it saying "No such file to load -- RMagick
(MissingSourceFile)"?
Is there a way to ignore validations? My Member model does use rmagick when
uploading files.
I have frozen the project at 1.1.6
This is what get_rss_data.rb looks like:
class GetRssData
def self.find_and_parse
feeds_to_parse = MemberRssUrl.find(:all)
for feed in feeds_to_parse
member = Member.find(feed.member_id)
ExternalFeedTools.new(feed.rss_url, member).parse_feed
end
end
end
ExternalFeedTools just parses the items out of the actual feed using
''FeedTools''. Nothing exciting going on there.
I''ve been using rmagick on my Powerbook for awhile (1.5 + years) and
this is
the first problem I''ve ever encountered.
Any ideas?
Thanks!
-Dave
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Dave Hoefler wrote:> Hi, > > I''m running a cron job to parse some RSS feeds. When running the > following > from the terminal everything works as expected: > > antrover:~/Sway/Projects/mi7/trunk/mi7 dave$ script/runner -e > development " > GetRssData.find_and_parse" > Loaded suite script/runner > Started > Finished in 0.001333 seconds. > 0 tests, 0 assertions, 0 failures, 0 errors >I just ran into that myself, what''s going on here.... Did you ever resolve this issue? -- Matthew Beale :: mixonic-8rZIAEcCR/xWk0Htik3J/w@public.gmane.org Resume & Portfolio @ http://madhatted.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The environment running cron seems to not know about gems. Check that the cron user can properly run ruby scripts / has access to use gems. Jason On 4/26/07, Matthew Beale <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Dave Hoefler wrote: > > Hi, > > > > I''m running a cron job to parse some RSS feeds. When running the > > following > > from the terminal everything works as expected: > > > > antrover:~/Sway/Projects/mi7/trunk/mi7 dave$ script/runner -e > > development " > > GetRssData.find_and_parse" > > Loaded suite script/runner > > Started > > Finished in 0.001333 seconds. > > 0 tests, 0 assertions, 0 failures, 0 errors > > > > I just ran into that myself, what''s going on here.... > > Did you ever resolve this issue? > > -- > Matthew Beale :: mixonic-8rZIAEcCR/xWk0Htik3J/w@public.gmane.org > Resume & Portfolio @ http://madhatted.com > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jason Roelofs wrote:> The environment running cron seems to not know about gems. Check that > the > cron user can properly run ruby scripts / has access to use gems. >Well, that as the cron error, I was actually running into the first one, the tests spewing out of script/runner. It turned out file_column is requiring it''s tests in init.rb, so I''m guessing that triggered some sort of test mode. I just commented them out and everything cleaned up. Thanks though, -- Matthew Beale :: mixonic-8rZIAEcCR/xWk0Htik3J/w@public.gmane.org Resume & Portfolio @ http://madhatted.com -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---