简体   繁体   中英

Ruby on Rails 2 with Heroku: how do I install plugins?

I did: heroku plugins:install git://github.com/galetahub/rails-ckeditor.git

And got

Could not initialize rails-ckeditor: uninitialized constant ActiveSupport

Are you attempting to install a Rails plugin? If so, use the following:

Rails 2.x:
script/plugin install git://github.com/galetahub/rails-ckeditor.git

Rails 3.x:
rails plugin install git://github.com/galetahub/rails-ckeditor.git

my gemfile:

source :rubygems
gem 'rails', '2.3.8'
gem 'authlogic', '2.1.6'
gem 'addresslogic', '1.2.1'
gem 'searchlogic', '2.4.19'
gem 'subdomain-fu', '0.5.4'
gem 'ckeditor', '3.4.3'

So what happened when you ran script/plugin install git://github.com/galetahub/rails-ckeditor.git ?

The idea of a plugin is that it will end up in the vendor directory in your Rails project, not as a stand-alone install on the server (those are gems).

DerNalia,

If I'm understanding you correctly I think you are misinterpreting what the heroku plugin install function is for. It's not for installing Rails plugins, it's for install plugins for the heroku command, like the heroku_colorize_console plugin. To install a plugin for your Rails application for Rails 2 you would use

script/plugin install git://github.com/galetahub/rails-ckeditor.git

This would install plugin into your vendor/plugins directory in your application and be initialized based on it's init.rb file (which is executed automated when the site loads). Your heroku app would have it accessible once you commit the changes and deploy back up to heroku.

See http://devcenter.heroku.com/articles/using-cli-plugins for more details about the Heroku command and the plugins function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM