Skip to content

Instantly share code, notes, and snippets.

Failures:
1) User pages signup with valid information followed by signout
Failure/Error: before { click_link("Sign out") }
Capybara::ElementNotFound:
no link with title, id or text 'Sign out' found
# (eval):2:in `click_link'
# ./spec/requests/user_pages_spec.rb:55:in `block (5 levels) in <top (required)>'
Finished in 0.78348 seconds
<header class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<%= link_to "sample app", root_path, id: "logo" %>
<nav>
<ul class="nav pull-right">
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "Help", help_path %></li>
<% if signed_in? %>
<li><%= link_to "Users", '#' %></li>
@JFickel
JFickel / gist:3037066
Created July 3, 2012 02:05
heroku wut
Warning: Permanently added the RSA host key for IP address '50.19.85.156' to the list of known hosts.
To git@heroku.com:mh-sample-app.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@heroku.com:mh-sample-app.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
@JFickel
JFickel / gist:3363483
Created August 15, 2012 20:45
cannot load such file -- SC2Ranks
def show
require 'SC2Ranks'
if logged_in?
if !User.find(session[:user_id]).nil?
@user = User.find(session[:user_id])
else
redirect_to welcome_path
end
@JFickel
JFickel / gist:3363570
Created August 15, 2012 20:54
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'paperclip'
gem 'aws-s3'
@JFickel
JFickel / gist:3363582
Created August 15, 2012 20:55
user controller
def show
if logged_in?
if !User.find(session[:user_id]).nil?
@user = User.find(session[:user_id])
else
redirect_to welcome_path
end
else
redirect_to welcome_path
end
@JFickel
JFickel / gist:3363596
Created August 15, 2012 20:55
show view
<%= @sc2_character.achievement_points %>
<div id="profile_picture"><%= image_tag @user.image.url(:medium) %></div>
@JFickel
JFickel / gist:3520029
Created August 29, 2012 23:01
OpenURI::HTTPError in UsersController#update
def update
@user = User.find(params[:id])
respond_to do |format|
if @user.update_attributes(params[:user])
if @user.sc2_url?
if @user.sc2_url[7,2] == 'us'
@user.sc2_server = "US"
end
@JFickel
JFickel / gist:3520055
Created August 29, 2012 23:03
OpenURI::HTTPError in UsersController#update: app/controllers/users_controller.rb:43:in `block in update', app/controllers/users_controller.rb:26:in `update'
class UsersController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
flash[:notice] = "Thanks for signing up. Important! In order to have full functionality of the site, add your game accounts to your profile."
@JFickel
JFickel / gist:3520074
Created August 29, 2012 23:05
error message
OpenURI::HTTPError in UsersController#update
404 Not Found
Rails.root: /Users/jamesfickel/Desktop/g_testing/g_alpha
Application Trace | Framework Trace | Full Trace
app/controllers/users_controller.rb:43:in `block in update'
app/controllers/users_controller.rb:26:in `update'
Request