Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7499793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:57:01+00:00 2026-05-29T19:57:01+00:00

Every time I create a controller, rails generate a controler_name.js and a controller_name.css file

  • 0

Every time I create a controller, rails generate a controler_name.js and a controller_name.css file on app/assets folder. I already disable the config.assets.enabled param on application.rb but this not solve my problem.
How can I disable the generator for those files when creating controller ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T19:57:03+00:00Added an answer on May 29, 2026 at 7:57 pm

    You can pass --skip-assets to your command to prevent these files from being created:

    rails g controller foo --skip-assets
    

    If you want something more permanent, you can turn it off altogether. Add this to config/application.rb (from How do I turn off automatic stylesheet/javascript generation on Rails 3.1?)

    config.generators.stylesheets = false
    config.generators.javascripts = false
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Every time I create a new project I copy the last project's ant file
Every time I create an object that has a collection property I go back
every time i create a FileInfo object and access it's lastaccesstime property, it's always
Every time I create a new excel sheet, I have to go in and
I want to create a custom control in C#. But every time I have
I need to create an array of images in which, every time I tap,
I know how to use tags in subversion. I create a tag every time
I have a medium-complex Rails app. The main controller (the one that does what
I'm developing a Rails app that does some plotting behind the scenes to generate
vs2008 (and earlier versions) always creates empty folders in c:\users\<username>\my documents every time it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.