1

I have a task which has to be run everyday. I will get just fetch the data from one table do some kind of computation and inserts into another table. I am using this gem

But the its not work and I get a error message when I run "clockwork config/clock.rb" I got the following error

.rvm/rubies/ruby-1.9.2-p320/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find clockwork (>= 0) amongst [abstract-1.0.0, actionmailer-3.2.3, actionmailer-3.0.7, actionpack-3.2.3, actionpack-3.0.7, activemerchant-1.12.0, activemodel-3.2.3, activemodel-3.0.7, activerecord-3.2.3, activerecord-3.0.7, activeresource-3.2.3, activeresource-3.0.7, activesupport-3.2.3, activesupport-3.0.7, acts_as_list-0.1.2, addressable-2.2.6, arel-3.0.2, arel-2.0.10, attr_required-0.0.5, attr_required-0.0.3, aws-s3-0.6.3, aws-s3-0.6.2, bcrypt-ruby-2.1.4, beanstalk-client-1.1.1, braintree-2.16.0, braintree-2.13.1, builder-3.0.0, builder-2.1.2, bundler-1.1.3, cancan-1.6.4, capistrano-2.12.0, chronic-0.6.7, coffee-rails-3.2.2, coffee-script-2.2.0, coffee-script-source-1.3.3, crack-0.3.1, daemons-1.1.8, daemons-1.1.4, delayed_job-2.1.4, delayed_job_web-1.1.2, delayed_job_web-1.1.1, devise-1.3.1, erubis-2.7.0, erubis-2.6.6, eventmachine-0.12.10, execjs-1.4.0, faker-0.9.5, faraday-0.8.1, faraday-0.8.0, faraday-0.7.5, fastercsv-1.5.5, fastercsv-1.5.4, fb_graph-2.4.17, fb_graph-2.4.11, fb_graph-1.7.1, garb-0.9.1, google-spreadsheet-ruby-0.3.0, google-spreadsheet-ruby-0.2.1, google_drive-0.3.0, haml-3.1.6, haml-3.1.4, hashie-1.2.0, highline-1.5.1, hike-1.2.1, httpauth-0.1, httpclient-2.2.5, httpclient-2.2.4, i18n-0.6.0, i18n-0.5.0, journey-1.0.4, jquery-rails-2.0.2, jquery-rails-0.2.6, jrails-0.6.0, json-1.7.3, json-1.6.6, json-1.5.1, json_pure-1.7.3, json_pure-1.6.6, json_pure-1.6.3, mail-2.4.4, mail-2.2.19, memcache-client-1.8.5, meta_search-1.0.1, mime-types-1.18, mime-types-1.17.2, multi_json-1.3.6, multi_json-1.3.2, multi_json-1.0.4, multipart-post-1.1.5, multipart-post-1.1.4, mysql2-0.2.18, mysql2-0.2.17, nested_set-1.6.4, net-scp-1.0.4, net-sftp-2.0.5, net-ssh-2.5.2, net-ssh-gateway-1.1.0, newrelic_rpm-3.4.0, newrelic_rpm-3.3.4.1, newrelic_rpm-3.3.1, nokogiri-1.5.4, nokogiri-1.5.0, oauth-0.4.6, oauth2-0.6.1, oauth2-0.5.2, omniauth-1.1.0, omniauth-1.0.1, omniauth-facebook-1.3.0, omniauth-facebook-1.2.0, omniauth-oauth2-1.0.2, omniauth-oauth2-1.0.1, omniauth-oauth2-1.0.0, orm_adapter-0.0.7, orm_adapter-0.0.5, paperclip-2.3.8, polyglot-0.3.3, rack-1.4.1, rack-1.2.2, rack-cache-1.2, rack-mount-0.6.14, rack-oauth2-0.14.4, rack-oauth2-0.6.6, rack-ssl-1.3.2, rack-test-0.6.1, rack-test-0.5.7, rails-3.2.3, rails-3.0.7, railties-3.2.3, railties-3.0.7, rake-0.9.2.2, rd_resource_controller-1.0.1, rd_unobtrusive_date_picker-0.1.0, rdoc-3.12, recaptcha-0.3.4, recaptcha-0.3.1, rest-client-1.6.1, restclient_with_cert-0.0.6, ruby-ole-1.2.11.3, rubygems-bundler-0.9.0, rvm-1.11.3.3, sass-3.1.19, sass-3.1.16, sass-rails-3.2.5, sinatra-1.2.8, spreadsheet-0.7.2, spreadsheet-0.6.8, spree-0.50.2, spree_api-0.50.2, spree_auth-0.50.2, spree_core-0.50.2, spree_dash-0.50.2, spree_promo-0.50.2, spree_sample-0.50.2, sprockets-2.1.3, sqlite3-1.3.6, sqlite3-1.3.5, stalker-0.9.0, starling-0.10.1, state_machine-0.9.4, stringex-1.0.3, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, tzinfo-0.3.33, tzinfo-0.3.31, uglifier-1.2.4, warden-1.0.6, whenever-0.7.3, will_paginate-3.0.pre2, xml-simple-1.1.1, yaml_db-0.2.3, yaml_db-0.2.2] (Gem::LoadError)

Please do help me to crack this out

4

3 回答 3

3

错误

该错误表示发条宝石不在加载路径中。

解决方案

如果这是一个 Rails 应用程序,请仔细检查项目的 Gemfile 中是否列出了 gem,并且已运行bundle install安装它。您还可以使用以下方法验证安装路径:

bundle list clockwork
于 2012-06-29T07:38:22.443 回答
1

您是否尝试使用确切的存储库?

我遇到了类似你的问题,我在 Gemfile 中解决了这个问题:

gem 'clockwork', :git => "https://github.com/tomykaira/clockwork.git"
于 2012-07-03T19:47:43.467 回答
0

您的 Gemfile 中是否提供发条宝石?

宝石'发条'
于 2012-06-29T07:30:20.307 回答