11

I found an example here showing how to install a Rails plugin. Their example shows this:

./script/plugin install calendar_helper

This won't work for me because, confusingly, I don't have anything called plugin in my script directory. All I have is rails:

$ ls script/
rails

So Rails doesn't come with the script you need to install plugins? You need a plugin to install plugins? That doesn't seem very likely. Is something wrong with my Rails project?

Jason Swett
  • 43,526
  • 67
  • 220
  • 351

2 Answers2

21

You're probably on Rails 3. Replace ./script/plugin with rails plugin.

rails plugin install calendar_helper

But the other problem is plugins, unlike gems, need to be installed with a full path. This was also true in Rails 2.x.

rails plugin install https://github.com/topfunky/calendar_helper.git
Brian Morearty
  • 2,794
  • 30
  • 35
  • P.S. You may or may not have problems with the calendar_helper plugin on Rails 3 though. The comments in https://github.com/topfunky/calendar_helper say it was last updated for Rails 2.2.3. – Brian Morearty Jan 14 '11 at 16:46
  • FWIW, after a couple years of using Rails, I've never done anything with plugins since I asked this question. It's all been gems. – Jason Swett Jan 02 '13 at 19:49
0

You should first input text like gem 'calendar_helper' in your Gemfile, and then run bundle install for rails 3.0

  • 4
    As per Andrei's comment below, and Brian's answer above, he is installing a plugin, not a gem. – ipd May 27 '11 at 05:42