0
votes

Ruby newbie here, using Rails 1.9.3 and Ruby 4.0. I am trying to use Paperclip from http://railscasts.com/episodes/134-paperclip, when running command: rails plugin install git://github.com/thoughtbot/paperclip.git

I get the following error C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in 'require': cannot load such file -- rails/commands/plugin (LoadError)

Has anyone come across this problem or suggest a solution, thanks all.

2

2 Answers

1
votes

documentations for paperclip gem has all the information needed:

https://github.com/thoughtbot/paperclip

the railscast that you use is 5 years old, and starting with rails 3 all plugins can be installed as gems in Gemfile or systemwide with gem install your_gem.

Gemfile

gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"

model

attr_accessible :avatar
  has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :default_url => "/images/:style/missing.png"

continue with docs https://github.com/thoughtbot/paperclip

1
votes

Joshua, plugins have been disabled in Rails 4. The proper way is to add the paperclip gem to your Gemfile and do bundle install