开发者

Rails 3 - Cant Install a git plugin through console...... How Can I Install A Plugin Manually

开发者 https://www.devze.com 2023-02-04 07:01 出处:网络
I\'m trying to install a plugin from the git repo =>https://github.com/maccman/acts_as_recommendable.

I'm trying to install a plugin from the git repo => https://github.com/maccman/acts_as_recommendable .

This is weird but I ran all kinds of things to install it =>

 rails plugin install https://github.com/maccman/acts_as_recommendable.git -force
 rails plugin install git://github.com/maccman/acts_as_recommendable.git --force
 rails plugin install https://github.com/maccman/acts_as_recommendable.git/ --force
 rails plugin install https://github.com/maccman/acts-as-recommendable.git --force

but the console doesnt show any files being added..... The vendor/plugins/ folder has an acts_as_recommendable nothing in it.

So I thought why not just try to download all the files and install them manually?

My question is where should I place the files? So...

=> There is a /lib folder with the plugins main logic files (acts_as_recommendable.rb, cache_fix.rb, optimization.rb, progress_bar.rb)

=> a /tasks folder with a rake file called (acts_as_recomm开发者_C百科endable_tasks.rake)

=> a /test folder with all the basic testing files

=> a rake file

and => a file called init.rb which has the 'requires' for the rb's in the /lib folder.

Where do I put all these?

should I throw all of them in the /vendor/plugins/acts_as_recommendable/ folder?

or add the files in the /lib to the main rails /lib folder, etc (but where does the init.rb file go?)

Has anyone tried installing these files manually and using the plugins this way?


At a quick glance it may be that the plugin is not Rails 3 compatible - see https://github.com/maccman/acts_as_recommendable/commit/03a99454431cd09f8b5b755fcf04b3838eda80e0

http://railsplugins.org/ is a good source for compatible Rails 3 plugins.


Just put the files in vendor/plugins/acts_as_recommendable. Some plugins have an install.rb file which gets run on install to add other files to the project or whatever, but that plugin does not, so all you need to do is add the files to vendor/plugins.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号