I am using adcenter-client gem for using microsoft's adcenter api in my RoR-2.3.8 application.
I am using ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
After installing the gem adcenter-client -v=7.0.3 I tried to execute rake adcenter-client but I got the following error:
rake aborted!
Don't know how to build task 'adcenter-client'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/task_manager.rb:49:in `[]'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:115:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2.2/bin/rake:33
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Can anyone please give me some suggestion to solve this error?
You only need to run this rake task if you checkout the code directly. When working with the Gem it is not needed.
Got the solution...
Even it is mentioned in GitHub to run rake adcenter-client, but it doesn't require. Code will work properly without this rake task too.
Related
My environment:
Ruby 2.4.1
Rails 5.1.4
I am trying to use the attach gem, written by the person who also wrote this article https://atech.blog/atech/file-attachments-in-rails-tutorial.
When I run the bundle install it installs attach gem, version 1.0.2
Then when I try to run the rake command I get an error saying it does not know how to build the task.
rake attach:install:migrations --trace
rake aborted!
Don't know how to build task 'attach:install:migrations' (see --tasks)
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/task_manager.rb:59:in `[]'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:159:in `invoke_task'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:116:in `each'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:116:in `block in top_level'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:110:in `top_level'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:83:in `block in run'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/lib/rake/application.rb:80:in `run'
/usr/local/rvm/gems/ruby-2.4.1/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.4.1/bin/rake:23:in `load'
/usr/local/rvm/gems/ruby-2.4.1/bin/rake:23:in `<main>'
/usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
/usr/local/rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
Any ideas on what the error is? I am wondering if I am missing a required gem to make it work. The link to the attach documentation is https://github.com/adamcooke/attach
There are no rake tasks defined in this repo.
After you run bundle install, you can get a list of rake tasks by running rake -P (rake -T shows tasks with descriptions). You'll see that attach:install:migrations is not there.
Why not try using paperclip?
I'm totaly noob in Ruby, and I can't execute the command rake db:load. Sorry for stupid question, but I need help.
The same error is thrown on rake db:seed
root#root:/var/www/dir# rake db:load --trace
rake aborted!
Don't know how to build task 'db:load'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/task_manager.rb:49:in `[]'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:142:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:101:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:110:in `run_with_threads'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:95:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:73:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-10.0.4/bin/rake:33
/usr/bin/rake:23:in `load'
/usr/bin/rake:23
There's two issues with this project. First of all it lacks a Javascript runtime. You can solve this by adding
gem 'execjs'
gem 'therubyracer'
to the GemFile and rerunning
bundle install
The second problem is that there is no db:load task specified. Looking at the code you want to use
bundle exec rake db:schema:load
That should work.
I'm trying to setup a testing server with Redmine and GIT. I'm following this series of tutorials:
Setting up a Centralized Git Service
Setting up the Redmine Front End
Integrating Redmine and Gitolite
Fully Automating the Redmine Gitolite Integration
I'm installing the Gitolite plugin for Redmine, and I'm having some trouble getting it to work. I follow all the instructions, but when i run rake db:migrate_plugins I get this error:
/usr/share/redmine# RAILS_ENV=production rake db:migrate_plugins --trace
rake aborted!
GONE
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:191:in `deprecate'
/usr/lib/ruby/vendor_ruby/rake/rdoctask.rb:4
/usr/lib/ruby/vendor_ruby/rails/tasks/documentation.rake:5:in `require'
/usr/lib/ruby/vendor_ruby/rails/tasks/documentation.rake:5
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:15:in `load'
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:15
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:6:in `each'
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:6
/usr/lib/ruby/vendor_ruby/rails/application.rb:292:in `require'
/usr/lib/ruby/vendor_ruby/rails/application.rb:292:in `initialize_tasks'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `instance_exec'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `each'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:424:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/application.rb:145:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `send'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/redmine/Rakefile:7
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:581:in `raw_load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:87:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:86:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/bin/rake:37
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Before that, I had to do some variations:
I've installed the plugin into /usr/share/redmine/plugins instead of /usr/share/redmine/vendor/plugins.
I've run bundle install so it installs some missing dependencies.
And I don't know what's next. I've been reading the docs over and over, but this seems to be a Ruby/Rails versioning problem out of my control.
I'm running Rails 3.2.8, Redmine 2.1.2 on Ubuntu 12.04 from PPAs. Perhaps I should stop trying these versions and go for old good Rails 2.3.14 and Redmine 1.3.2?
I have a Rails app that needs to store resumes for job applications. Locally, the attachment works fine using the Paperclip plugin. I would like to store them on production using the paperclipdropbox gem. I did the following :
1) set up paperclip for attachment following the document on github
2) ran the command for installing the dropbox gem, on which paperclipdropbox
gem install dropbox
3) set up paperclipdropbox as per https://github.com/dripster82/paperclipdropbox#readme
My paperclipdropbox.yml file looks like that
development:
dropbox_key: email_for_dropbox_account
dropbox_secret: password_for_dropboxaccount
production:
dropbox_key: email_for_dropbox_account
dropbox_secret: password_for_dropboxaccount
After running
rake paperclipdropbox:authorize
I get the following error :
C:\Sites\appname>rake paperclipdropbox:authorize --trace
rake aborted!
Don't know how to build task 'paperclipdropbox:authorize'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/task_
manager.rb:49:in `[]'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:115:in `invoke_task'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in `each'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:94:in `block in top_level'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:88:in `top_level'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:66:in `block in run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:133:in `standard_exception_handling'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/appli
cation.rb:63:in `run'
C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in
`'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `load'
C:/RailsInstaller/Ruby1.9.2/bin/rake:19:in `'
I didn't find much documentation online unfortunately. Any idea of what may be causing the problem ? Do you have any other free alternatives for storage ?
I think you might have installed the gems, but didn't defined them in your Gemfile. Make sure that you have paperclip, dropbox, paperclip-dropbox gem in your Gemfile.
gem 'paperclip'
gem 'dropbox'
gem 'paperclipdropbox'
then run bundle install, and try to run that rake task again. This is because by default Bundler would isolate and make only gems that in your Gemfile to be visible to your Rails application.
You must create the project in dropbox. Here you have the link.
after use rake paperclipdropbox:authorize
I've never sent this one before. I'm configuring a new server with an existing application. Trying to run a migration and here's the output.
root#beta:/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010# RAILS_ENV=production rake db:migrate --trace
rake aborted!
private method `gsub' called for nil:NilClass
/usr/local/rvm/gems/jruby-1.6.6#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:77:in `require'
org/jruby/RubyArray.java:1614:in `each'
/usr/local/rvm/gems/jruby-1.6.6#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
/usr/local/rvm/gems/jruby-1.6.6#global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010/config/application.rb:7:in `(root)'
org/jruby/RubyKernel.java:1027:in `require'
/usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010/config/application.rb:4:in `(root)'
org/jruby/RubyKernel.java:1052:in `load'
/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010/Rakefile:25:in `load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/bin/rake:33:in `(root)'
org/jruby/RubyKernel.java:1052:in `load'
/usr/local/rvm/gems/jruby-1.6.6#foo/bin/rake:19:in `(root)'
Migrations on my local laptop and on an existing server are working fine. config/database.yml looks right. Database is up and running and I can connect to it. What is this?
I also just tested rails console and I'm also not able to get a console. Again a private method gsub called for nil:NilClass. It's somehow related to connecting to the database and I'm not sure how/why.
** UPDATE **
After adding some debug into runtime.rb, this is the exception that's being raised:
#<LoadError: no such file to load -- activerecord-jdbcmysql-adapter>
The messed up part is, it is installed:
# gem list |grep -i activerecord-jdbcmysql-adapter
activerecord-jdbcmysql-adapter (1.2.2)
Is this some kind of RVM or bundler bug?
** LAST UPDATE **
I installed Amazon Linux AMI (The other is running an Ubuntu) and cannot replicate this issue there.
This is a bug in bundler, it was reported for rvm-capistrano, please check your Gemfile and try removing / commenting some gems.
https://github.com/carlhuda/bundler/issues/1801