All threads / Using Purchased Themes with Rails Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Using Purchased Themes with Rails Discussion

Hey Chris, for years, I've been taking templates and just putting them in the app/assets folders instead of going the route of the Vendors folders. Is there a specific reason for going with Vendors over App?

Reply

Chris,

I have an existing site that I wanted to refresh so I purchased a theme from themes.getbootstrap.com.
Here's what I've done so far:

  • unzipped the file
  • copied the 5 folders (css, fonts, images, js, scss) from the theme's assets folder
  • pasted the folders in my rails project folder vender/assets/themes/guidebook/
  • added Rails.application.config.assets.paths << Rails.root.join('vendor') into my initializers/assets.rb file
  • restarted my app but it's obvious that the styles are not there

I'd appreciate any help

Reply

Hi Chris, my theme seems to have ordered things by library/vendor (like one folder per vendor, containing each their own dist, src, gulp files) and my compiled html pages from the theme refer sometimes to their .js or their css files (the compiled ones, aka from their "dist" folders).

Where would you recommend putting the vendor folder containing all those vendors folders then?
Shall I put it under "public", "lib" or "vendor" folder within my app, to be directly called in my .html.erb files when needed?

Thanks a lot for your help as always

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 52,887+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2021 GoRails, LLC. All rights reserved.