Ruby on Rails 2 与 Heroku:如何安装插件?
我做了: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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那么,当您运行 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).
DerNalia,
如果我理解正确的话,我认为您误解了 heroku 插件安装功能的用途。它不是用于安装Rails插件,而是用于安装heroku命令的插件,例如heroku_colorize_console插件。要为 Rails 2 的 Rails 应用程序安装插件,您可以使用
这会将插件安装到应用程序中的供应商/插件目录中,并根据其 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
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.