Skip to content

Instantly share code, notes, and snippets.

View Sadin's full-sized avatar
👽
Go

Zach Snyder Sadin

👽
Go
View GitHub Profile
sadin@Sparkz:~$ gem install rails
ERROR: Loading command: install (LoadError)
no such file to load -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
@Sadin
Sadin / rakefail
Created May 16, 2011 20:01
rake fails
sadin@Sparkz:~/blog$ rake db:create
(in /home/sadin/blog)
Could not find gem 'sqlite3-ruby (>= 0)' in any of the gem sources listed in your Gemfile.
@Sadin
Sadin / gist:975234
Created May 16, 2011 20:06
rake error again
cadin@Sparkz:~$ gem install sqlite3-ruby
Building native extensions. This could take a while...
ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/home/sadin/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path (the
location where your sqlite3 shared library is located).
Tutorial intructions...
Now, you have to tell Rails where your actual home page is located. Open the file config/routes.rb in your editor. This is your application’s routing file which holds entries in a special DSL (domain-specific language) that tells Rails how to connect incoming requests to controllers and actions. This file contains many sample routes on commented lines, and one of them actually shows you how to connect the root of your site to a specific controller and action. Find the line beginning with :root to, uncomment it and change it like the following:
Blog::Application.routes.draw do
#...
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
root :to => "home#index"
/home/sadin/.rvm/rubies/ruby-1.9.2-p180/bin/ruby: No such file or directory -- use (LoadError)
class PostsController < ApplicationController
before_filter :authenticate, :except => [:index, :show]
# GET /posts
# GET /posts.xml
def index
@posts = Post.all
respond_to do |format|
format.html # index.html.erb
@Sadin
Sadin / gist:997394
Created May 29, 2011 02:06
Lightbox CSS3
#lightbox {
background: #fff;
border: 15px solid rgba(0, 0, 0, 0.3);
-moz-border-radius:10px;
-moz-box-shadow: 0 0 1em #fff15b;
-webkit-box-shadow: 0 0 1em #fff15b;
box-shadow: 0 0 1em gold;
-moz-background-clip: border; /* Firefox 3.6 */
-webkit-background-clip: border; /* Safari 4? Chrome 6? */
OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug2: key_type_from_name: unknown key type '-----END'
2011-06-18T03:25:51+00:00 heroku[router]: GET falling-rain-273.heroku.com/javascripts/controls.js dyno=web.1 queue=0 wait=0ms service=2ms bytes=34787
2011-06-18T03:25:51+00:00 heroku[nginx]: GET /javascripts/effects.js HTTP/1.0 | 62.24.181.134 | 38758 | http | 200
2011-06-18T03:25:51+00:00 heroku[nginx]: GET /javascripts/dragdrop.js HTTP/1.0 | 62.24.181.134 | 31346 | http | 200
2011-06-18T03:25:51+00:00 heroku[router]: GET falling-rain-273.heroku.com/javascripts/rails.js dyno=web.1 queue=0 wait=0ms service=7ms bytes=6278
2011-06-18T03:25:51+00:00 heroku[nginx]: GET /javascripts/controls.js HTTP/1.0 | 62.24.181.134 | 35077 | http | 200
2011-06-18T03:25:51+00:00 heroku[router]: GET falling-rain-273.heroku.com/javascripts/application.js dyno=web.1 queue=0 wait=0ms service=1ms bytes=148
2011-06-18T03:25:52+00:00 heroku[nginx]: GET /javascripts/rails.js HTTP/1.0 | 62.24.181.134 | 6568 | http | 200
2011-06-18T03:25:52+00:00 heroku[router]: GET falling-rain-273.heroku.com/robots.txt dyno=web.1 queue=0 wait=0ms servi
ActiveRecord::Schema.define(:version => 20110517142523) do
create_table "comments", :force => true do |t|
t.string "commenter"
t.text "body"
t.integer "post_id"
t.datetime "created_at"
t.datetime "updated_at"
end