Skip to content

Instantly share code, notes, and snippets.

View oseifrimpong's full-sized avatar
🎯
Focus

Obed Osei Frimpong oseifrimpong

🎯
Focus
View GitHub Profile
1) User Pages signup page
Failure/Error: it { should have_selector('title', text: full_title('Sign up'))}
expected #has_selector?("title", {:text=>"Ruby on Rails Tutorial Sample App | Sign up"}) to return true, got false
# ./spec/requests/user_pages_spec.rb:12:in `block (3 levels) in <top (required)>'
2) Static pages Home page it should behave like all static pages
Failure/Error: it { should have_selector('title', content: full_title(page_title)) }
ArgumentError:
invalid keys :content, should be one of :text, :visible, :between, :count, :maximum, :minimum
Shared Example Group: "all static pages" called from ./spec/requests/static_pages_spec.rb:18
@oseifrimpong
oseifrimpong / gist:7546578
Created November 19, 2013 14:57
Error after running "gem install rails"
ERROR: While executing gem ... (OpenSSL::SSL::SSLError)
SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'
#Use PostgreSQL
group :production do
gem 'pg', '0.17.0'
end
<header class = "navbar navbar-fixed-top">
<div class = "navbar-inner">
<div class ="container">
<%= link_to "SCUTISU", scut_home_path, id: "logo" %>
<nav>
<ul class ="nav pull-right">
<li><%= link_to "Home", scut_home_path %></li>
<li><%= link_to "About Us", scut_aboutus_path %></li>
<li><%= link_to "Contact Us", scut_contactus_path %></li>
<li><%= link_to "Sign in", "#" %></li>
# == Schema Informationdescribe "when name is not present" do
# before { @user.name = " " }
# it { should_not be_valid }
# end
#
# Table name: users
#
# id :integer not null, primary key
# name :string(255)
# email :string(255)
@import "bootstrap";
/*mixins, variables, etc*/
$grayMediumLight: #eaeaea;
@mixin box_sizing {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
class LandingController < ApplicationController
layout 'landingPage'
def soon
@coming = Coming.new
end
<%= form_for(@coming, url: landing_soon_path) do |f| %>
<%= f.text_field :email, class: "form-control", placeholder: "Enter Email" %>
<br>
<%= f.submit "Alert Me", class: "btn btn-primary btn-lg btn-block" %>
<% end %>
post 'landing/soon' => 'landing#save_email'
get 'landing/soon' => 'landing#soon'
get 'main/home'
class Coming < ActiveRecord::Base
attr_accessible :email
end