Skip to content

Instantly share code, notes, and snippets.

View jtomasek's full-sized avatar

Jiri Tomasek jtomasek

  • SUSE
  • Usti nad Orlici, Czech Republic
View GitHub Profile
<div class="row">
<%= field(f, :layout_id, :label => _('Deployment Layout')) do
radio_button_f_non_inline(f, :layout_id, :value=>1, :text=> _("Distributed, Nova Networking"))+
radio_button_f_non_inline(f, :layout_id, :value=>2, :text=> _("Distributed, Neutron Networking"))+
radio_button_f_non_inline(f, :layout_id, :value=>3, :text=> _("Distributed With High Availability, Nova Networking"))+
radio_button_f_non_inline(f, :layout_id, :value=>4, :text=> _("Distributed With High Availability, Neutron Networking"))
end %>
</div>
<div class="row">
Validation failed: Name must not include periods, Name is invalid, Environment can't be blank, Architecture can't be blank, Operatingsys│→ git st
tem can't be blank, Domain can't be blank, Ptable cant be blank unless a custom partition has been defined (ActiveRecord::RecordInvalid)│# Not currently on any branch.
/root/foreman/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.17/lib/active_record/validations.rb:56:in `save!' │nothing to commit (working directory clean)
/root/foreman/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.17/lib/active_record/attribute_methods/dirty.rb:33:in `save!' │root@foreman: ~/staypuft
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
== ChangeColumnDefaultFormStepOnStaypuftDeployment: migrating ================
-- change_column(:staypuft_deployments, :form_step, :string, {:default=>"inactive", :null=>false})
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::ConstraintException: staypuft_deployments.form_step may not be NULL: INSERT INTO "staypuft_deployments" ("id","name","description","layout_id","hostgroup_id","created_at","updated_at","form_step") VALUES (1, 'My Deployment', '', 4, 2, '2014-04-09 11:55:48.494913', '2014-04-09 11:55:58.550448', NULL)/root/foreman/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.9/lib/sqlite3/statement.rb:108:in `step'
/root/foreman/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.9/lib/sqlite3/statement.rb:108:in `block in each'
/root/foreman/vendor/bundle/ruby/
2014-09-17 12:52:40.515 | ++ echo /home/jtomasek/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-initrd
2014-09-17 12:52:40.515 | ++ break
2014-09-17 12:52:40.515 | ++ true
2014-09-17 12:52:40.515 | + ramdisk=/home/jtomasek/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-initrd
2014-09-17 12:52:40.515 | ++ for f in '"$xdir/"*.img' '"$xdir/"ami-*/image'
2014-09-17 12:52:40.515 | ++ '[' -f /home/jtomasek/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-blank.img ']'
2014-09-17 12:52:40.515 | ++ echo /home/jtomasek/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-blank.img
2014-09-17 12:52:40.515 | ++ break
2014-09-17 12:52:40.515 | ++ true
2014-09-17 12:52:40.516 | + image=/home/jtomasek/devstack/files/images/cirros-0.3.2-x86_64-uec/cirros-0.3.2-x86_64-blank.img
@jtomasek
jtomasek / f14template.tpl
Created August 16, 2012 08:05
f14template
<template>
<name>f14jeos</name>
<os>
<name>Fedora</name>
<version>14</version>
<arch>x86_64</arch>
<rootpw>password</rootpw>
<install type='url'>
<url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86_64/os/</url>
</install>
@jtomasek
jtomasek / gist:3495315
Created August 28, 2012 05:53 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@jtomasek
jtomasek / gist:3788003
Created September 26, 2012 13:22
deployable xml with services
<?xml version="1.0"?>
<deployable version="1.0" name="Test Deployable">
<description/>
<assemblies>
<assembly name="Test-Template" hwp="hwp1">
<image id="a7dc166e-fc03-11e1-b5a1-5254009d4013"/>
<services>
<service name="my-service">
<executable url="http://www.example.com/script.sh"/>
<files>
@jtomasek
jtomasek / gist:3953313
Created October 25, 2012 15:23
html_safe
(:recovery_strings => _("Forgot %s or %s?") % [link_to(_("Username"), login_path(:card => :username_recovery), :id => "username_link"),
link_to(_("Password"), login_path(:card => :password_reset), :id => "password_link")]).html_safe
@jtomasek
jtomasek / rails_translations.rb
Created November 26, 2012 16:02
/app/helpers/alchemy/rails_translations.rb
module Alchemy::RailsTranslations
TRANSLATIONS = {
:noscript => I18n.t("user_sessions.noscript"),
:username => I18n.t("user_sessions.username"),
:password => I18n.t("user_sessions.password"),
:login => I18n.t("user_sessions.login"),
:recovery_link => I18n.t("user_sessions.recovery_link"),
:email_address => I18n.t("password_resets.email_address"),
:send_login => I18n.t("username_recoveries.recover_usernames"),
:password_unknown => I18n.t("password_resets.password_unknown"),
@jtomasek
jtomasek / gist:4216919
Created December 5, 2012 16:04
user_sessions#new
= content_for(:content) do
= render :partial => "alchemy/layouts/login_layout",
:locals => { :login_form_path_string => user_sessions_path,
:recovery_strings => t("user_sessions.recovery_link_html",
:username => link_to( t("user_sessions.username"),
login_path(:card => :username_recovery),
:id => 'username_link' ),
:password => link_to( t("user_sessions.password"),
login_path(:card => :password_reset),
:id => 'password_link' )),