railstutorial.org

Trying to set up Amazon's S3 bucket: 403 Forbidden error & setting permissions

会有一股神秘感。 提交于 2019-11-30 15:17:57
I'm following Hartl's railstutorial.org and have arrived at 11.4.4: Image upload in production . What I've done: Signed up for Amazon Web Services In Amazon Identity and Access Management I created a user. The user was created succesfully. In Amazon S3 I created a new bucket. Set permissions on the new bucket: Permissions: The tutorial instructs to "grant read and write permission to the user created in the previous step". However, under 'Permissons' for the bucket the new user's name is not mentioned. I could only choose between Everyone, Authenticated users, Log delivery, Me, and a username

Hartl's rails tutorial completed works locally perfect. Heroku persists “We're sorry, but something went wrong.”

自闭症网瘾萝莉.ら 提交于 2019-11-30 09:34:00
问题 I'm new to Ruby on Rails (new to programming altogether) and this is my first post on stack overflow. I want to thank everyone in advance because I have learned so much from previous posts. I completed the Micheal Hartl Ruby on Rails Tutorial but can't get it to launch successfully on Heroku even though it works perfect locally. Iv done the following: git push git push heroku master heroku pg:reset DATABASE heroku run rake db:migrate heroku run rake db:populate (I have also done this without

Failure: Expected 0 to be >= 1 on ruby on rails

我们两清 提交于 2019-11-30 09:19:37
问题 I'm doing Hartle tutorial and see this failure every time I run rake test I see this failure: 1) Failure: StaticPagesControllerTest#test_should_get_help [.../sample_app/test/controllers/static_pages_controller_test.rb:14]: <Help | Ruby on Rails Tutorial Sample App> expected but was <Ruby on Rails Tutorial Sample App>.. Expected 0 to be >= 1. What does it mean? And how can I solve it? This is my static_pages_controller_test.rb file. require 'test_helper' class StaticPagesControllerTest <

How to grant permissions to AWS user for Hartl's rails tutorial

北城余情 提交于 2019-11-30 05:48:46
I don't know how (or where also) to grant read and write permission to the user from AWS so users can post pictures on sample_app in production enviroment. This is final task in 11th chapter, it isn't covered by tutorial and I can't find solution anywhere. This is carrier_wave.rb file: if Rails.env.production? CarrierWave.configure do |config| config.fog_credentials = { # Configuration for Amazon S3 :provider => 'AWS', :aws_access_key_id => ENV['lalala'], :aws_secret_access_key => ENV['oloalle'] } config.fog_directory = ENV['name of bucket'] end end This is procedure from tutorial: 1) create

Trying to set up Amazon's S3 bucket: 403 Forbidden error & setting permissions

China☆狼群 提交于 2019-11-29 21:58:57
问题 I'm following Hartl's railstutorial.org and have arrived at 11.4.4: Image upload in production. What I've done: Signed up for Amazon Web Services In Amazon Identity and Access Management I created a user. The user was created succesfully. In Amazon S3 I created a new bucket. Set permissions on the new bucket: Permissions: The tutorial instructs to "grant read and write permission to the user created in the previous step". However, under 'Permissons' for the bucket the new user's name is not

Hartl's rails tutorial completed works locally perfect. Heroku persists “We're sorry, but something went wrong.”

偶尔善良 提交于 2019-11-29 16:19:36
I'm new to Ruby on Rails (new to programming altogether) and this is my first post on stack overflow. I want to thank everyone in advance because I have learned so much from previous posts. I completed the Micheal Hartl Ruby on Rails Tutorial but can't get it to launch successfully on Heroku even though it works perfect locally. Iv done the following: git push git push heroku master heroku pg:reset DATABASE heroku run rake db:migrate heroku run rake db:populate (I have also done this without heroku restart with same results) Things go wrong when I preform command: heroku run rake db:populate

Rails - NoMethodError: undefined method `configure' for #<FirstApp

穿精又带淫゛_ 提交于 2019-11-29 12:43:26
I am working on a tutorial, I am trying to do step 1.4.2 . I have tried several things but none seem to work when I searched the web "NoMethodError: undefined method `configure'". I looked at all the links and several similar searches that came up but none worked. In the book it says to do this: # This should only be used if your Heroku deploy fails without it. $ rake assets:precompile $ git add . $ git commit -m "Add precompiled assets for Heroku" but it has not worked or i have not gotten it to work Here is the real issue when i do $ git push heroku master this is the result. james@ubuntu:~

Session not destroyed when closing browser - RailsTutorial.org

谁说胖子不能爱 提交于 2019-11-29 11:24:19
In working through Michael Hartl's railstutorial.org, I'm in Chapter 8 (specifically 8.2.3). The current problem is implementing a session to keep the user logged in across multiple views, but the functionality implemented in this section is supposed to be a temporary session that expires (logs the user out) when the browser window is closed. Here is the statement from the textbook indicating such: If you quit your browser completely, you should also be able to verify that the application forgets your login status, requiring you to log in again to see the changes described above. I've tested

Why use 'reload' method after saving object? (Hartl Rails Tut 6.30)

我怕爱的太早我们不能终老 提交于 2019-11-29 06:10:44
问题 I'm working on the exercises for chapter 6 of Hartl's Rails 4 Tutorial. The first exercise tests to make sure that user email addresses are down-cased correctly: require 'spec_helper' describe User do . . . describe "email address with mixed case" do let(:mixed_case_email) { "Foo@ExAMPle.CoM" } it "should be saved as all lower-case" do @user.email = mixed_case_email @user.save expect(@user.reload.email).to eq mixed_case_email.downcase end end . . . end What I don't understand is why the

rake db:migrate is not working

为君一笑 提交于 2019-11-28 21:21:30
I'm working through the rails tutorial and have gotten stuck. Starting at Listing 8.16 I have made the following modifications to <timestamp>_add_remember_token_to_users.rb : class AddRememberTokenToUsers < ActiveRecord::Migration def change add_column :users, :remember_token, :string add_index :users, :remember_token end end The guide then says to update dev & test db as usual: $ bundle exec rake db:migrate $ bundle exec rake db:test:prepare My User test for the *remember_token* is still failing so I took a look at the user table in dev and tests database with command line sqlite3. They look