Question

I am using Ruby 1.9.3p194 with Rails 3.2.13 and have newly created an Rails application which contains /vendor folder with .gitkeep files:

/vendor/assets/javascripts
/vendor/assets/stylesheets
/vendor/plugins

all the folders are empty.

When I run this application on Heroku it warns:

DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins!
Support for these plugins will be removed in Rails 4.0. Move them out
and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/*
and config/initializers/myplugin.rb. See the release notes for more on this:
http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released.
(called from <top (required)> at /app/config/environment.rb:5)

Could this /vendor folder be deleted completely without any negative consequences?

Was it helpful?

Solution 2

You get this message on Heroku because with Rails 3 they inject plugins at compile time for logging and pipeline.

To prevent these deprecation notices if you add

gem 'rails_12factor', group: 'production' 

to your gemfile they will disappear since this gem provides the same functionality as the previously injected plugins. This recently came up on the Heroku Changelog - see https://devcenter.heroku.com/changelog-items/318

OTHER TIPS

I don't have this version of Rails installed to test this with, but I can offer a suggestion in lieu of a definitive answer.

Simply rename the /vendor folder something else and try to run the application again. See if it fails (or some other negative consequences), or succeeds (isn't needed). Even if it succeeds, you can always keep it in case it is needed in the future.

use

mv old-folder-name new-folder-name
so...
mv /vendor /vendor.backup

And everything under it will remain in /vendor.backup

No it wont hurt to remove this directory. But it should be enough just to remove /vendor/plugins so no actually need to remove the whole /vendor path.

Rails 4.0 apps have only /vendor/assets/javascripts and /vendor/assets/stylesheets, empty except for the .keep file.

Given it's empty, you could certainly remove /vendor/plugins (which should get rid of the deprecation warning). I would just leave the /vendor/assets directories.

vendor/bundle/ruby/2.6.0/gems/sassc-2.4.0/ext/libsass.so: cannot open shared object file: No such file or directory

when i have some troubles in deployment on the server, like compilation of extension ".so". i delete the vendor/bundle of my local app or add it in gitignore. so the built, compilation and deployment is entirely done by the machine running the server.

Your local machine and the machine running the server are always differents.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top