Skip to content

Instantly share code, notes, and snippets.

View Ravenna's full-sized avatar

Ravenna Ravenna

View GitHub Profile
<h1>New piece</h1>
<% form_for @piece, :html => { :multipart => true } do |f| %>
<%= f.error_messages %>
<p>
<%= f.label :title %><br />
<%= f.text_field :title %>
</p>
<p>
SyntaxError in Pieces#new
Showing app/views/pieces/new.html.erb where line #11 raised:
/Users/tjs/Sites/goodtest/app/models/photo.rb:15: syntax error, unexpected kEND, expecting $end
Extracted source (around line #11):
8: <%= f.text_field :title %>
9: </p>
require 'capistrano/ext/multistage'
set :application, "Dixie Stark Home"
set :repository, "git://github.com/Ravenna/Dixie-Stark-Home.git"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"
<div id="event_calendar">
<link rel="stylesheet" type="text/css" href="<?php if(!is_admin()){bloginfo('template_url');} ?>/styles/fullcalendar.css"/>
<script type="text/javascript" src="<?php if(!is_admin()){bloginfo('template_url');} ?>/scripts/fullcalendar.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
<?php
// Please specify your Mail Server - Example: mail.yourdomain.com.
ini_set("SMTP","gwa1.webcontrolcenter.com");
// Please specify an SMTP Number 25 and 8889 are valid SMTP Ports.
ini_set("smtp_port","25");
// Please specify the return address to use
<?php
/*
Template Name: Events
*/
?>
<?php get_header();?>
<div id="int_subhead">
<p class="sub_head_title century">EVENTS</p>
@Ravenna
Ravenna / gist:1298878
Created October 19, 2011 16:41
Terminal Output
=> Booting WEBrick
=> Rails 3.1.1 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': no such file to load -- rails/init.rb (LoadError)
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require'
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency'
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/tjs/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency'
@Ravenna
Ravenna / functions.php
Created October 21, 2011 16:01
functions.php
<?php
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 150, 150, true);
add_action('init', 'company_register');
@Ravenna
Ravenna / gist:1373911
Created November 17, 2011 17:57
mailer send
class Weapon < ActiveRecord::Base
belongs_to :zombie
before_save :check_ammo
def check_ammo
if self.ammo == 3
WeaponMailer.check_ammo(self, self.zombie).deliver
@Ravenna
Ravenna / gist:1377351
Created November 18, 2011 18:44
cap bundler error
* executing "cd /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111117233533 && bundle install --gemfile /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111117233533/Gemfile --path /home/emeraldcityguitars/emeraldcityguitars.com/shared/bundle --deployment --quiet --without development test"
servers: ["blackhawks.dreamhost.com"]
[blackhawks.dreamhost.com] executing command
*** [err :: blackhawks.dreamhost.com] sh: bundle: command not found
command finished in 76ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/emeraldcityguitars/emeraldcityguitars.com/releases/20111117233533; true"
servers: ["blackhawks.dreamhost.com"]
[blackhawks.dreamhost.com] executing command
command finished in 95ms