Answer the question
In order to leave comments, you need to log in
Building a project on rails
I am doing my first project on rails and want to ask a question about the project structure.
The project is on github, let's say I use several jquery plugins (located in /app/assets/javascript), adding them to my repository seems to me not a very good tone.
Is there such a collector in rails that, when building a project in production, downloads all the necessary plugins for JS from where?
PS I am using rails 3.2
Answer the question
In order to leave comments, you need to log in
app/assets
- for files that belong to or are created by the application itself.
lib/assets
- for your libraries, which you yourself wrote and belong to you.
vendor/assets
- for libraries from third-party developers.
This does not solve your problem, but at least you will not interfere with your files with other people's libraries. I also started throwing everything in app/assets
, there’s nothing wrong with that, it’s just not beautiful and my hands don’t reach to rearrange everything in its place - laziness ...
There are gems for popular frameworks that can be included in the gemfile
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'bootstrap-sass'
gem 'chosen-rails'
gem 'angularjs-rails'
gem 'markitup-rails'
gem 'font-awesome-rails'
end
gem 'chosen-rails'
gem 'markitup-rails'
config/application
config.assets.paths << "/home/username/Dropbox/jsLibs"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question