← Back to Upcase

Cleaning up a Controller exercise

(Andy Waite) #1

I’m really enjoying working on this exercise. It will be interesting to see how everyone approaches the testing aspect.

However, I’ve ran into a few minor issues with it:

  • The Gemfile specifies Ruby 2.1.0 but there is no corresponding .ruby-version file
  • I had to add host: localhost the the database.yml configuration, otherwise bin/setup was failing with a socket error. This may be a problem with my Postgres setup, but since Rails itself has this line by default, I would think it should be present?
  • The controller spec provided is verifying the assigns in actions which perform redirects. Isn’t this redundant, since assigns don’t carry over between redirects?

(Andy Waite) #3

I pushed my solution but something is messed up. I added Spring binstubs during development, then reverted them, and re-pushed. But they are are still appearing in the solution submission, and it’s breaking the page layout.

Also, the solutions already there by srt32 and scott2619 are showing up as blank for me.

(Chad Pytel) #4

Yes, I think we could probably add these.

I’d say that we’ve tried to make the specs be a realistic spec file. So, it can likely be improved, but that is not the focus of the exercise. This comment is one that is best made by actually changing the specs in your solution and seeking feedback on your solution.

Sorry for the trouble. We’ll check on this.

(Joe Ferris) #5

I just poked our server to make it fetch the latest version of your repository, and your solution is updated now. Sorry about the trouble there.

(Andy Waite) #6

Thanks Joe. However I’m still unable to view any of the other solutions (there are 6 listed).

(Joe Ferris) #7

Sorry to have missed this earlier. Looks like there were a few people who accidentally submitted blank solutions to that exercise. We’ve since cleaned out all the blank solutions and deployed code to prevent users from submitting any new blank solutions.

(Renan Gurgel) #8

By the way, I have to add in database.yml file the instruction template: template0 to work here.
This was related to a PG::InvalidParameterValue: ERROR:after run bin/setup