title: Rails Generate controller aws error missing bucket name
body: <p>I am attempting to create a Users controller in my ruby on rails project, which I have also configured with heroku and an aws-s3 bucket. I set my .env and my heroku local with the S3_BUCKET, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY. I also set my initializer/aws.rb file to look like this:</p>
  
  <pre><code>Aws.config.update({
    region: 'us-east-1',
    credentials: Aws::Credentials.new(ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']),
  })
  
  S3_BUCKET = Aws::S3::Resource.new.bucket(ENV['S3_BUCKET'])
  </code></pre>
  
  <p>I have bundle installed the aws gem like this:</p>
  
  <pre><code>gem 'aws-sdk', '~&gt; 3'
  </code></pre>
  
  <p>However when I run the command</p>
  
  <pre><code>rails g controller Users new
  </code></pre>
  
  <p>I get the following error in my terminal:</p>
  
  <pre><code>aws-sdk-s3/bucket.rb:658:in `extract_name': missing required option :name (ArgumentError)
  </code></pre>
  
  <p>I looked at that file and it is trying to find the S3 bucket name, but I have set that already in .env and heroku local. Is there some other place where this needs to be set? None of the guides I have read mention this error.</p>