Ruby on Rails 2 与 Heroku:如何安装插件?

发布于 2024-10-20 11:49:43 字数 641 浏览 2 评论 0原文

我做了:heroku插件:安装git://github.com/galetahub/rails-ckeditor.git

并得到了

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

我的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'

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'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

喜爱纠缠 2024-10-27 11:49:43

那么,当您运行 script/plugin install git://github.com/galetahub/rails-ckeditor.git 时发生了什么?

插件的想法是,它将最终出现在 Rails 项目的供应商目录中,而不是作为服务器上的独立安装(那些是 gem)。

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).

注定孤独终老 2024-10-27 11:49:43

DerNalia,

如果我理解正确的话,我认为您误解了 heroku 插件安装功能的用途。它不是用于安装Rails插件,而是用于安装heroku命令的插件,例如heroku_colorize_console插件。要为 Rails 2 的 Rails 应用程序安装插件,您可以使用

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

这会将插件安装到应用程序中的供应商/插件目录中,并根据其 init.rb 文件进行初始化(该文件在站点加载时自动执行)。一旦您提交更改并部署回heroku,您的heroku应用程序就可以访问它。

请参阅http://devcenter.heroku.com/articles/using-cli-plugins 有关 Heroku 命令和插件功能的更多详细信息。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文