The following error appeared upon upgrading JRuby:
OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format
variable "aws_region" { | |
default = "eu-west-1" | |
} | |
variable "domain" { | |
default = "my_domain" | |
} | |
provider "aws" { | |
region = "${var.aws_region}" |
require "active_record" | |
namespace :db do | |
db_config = YAML::load(File.open('config/database.yml')) | |
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
desc "Create the database" | |
task :create do | |
ActiveRecord::Base.establish_connection(db_config_admin) |
Devise.setup do |config| | |
config.warden do |manager| | |
manager.strategies.add(:remote, Devise::Strategies::RemoteAuthenticatable) | |
manager.default_strategies(:scope => :user).unshift :remote | |
end | |
end |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
# LiquidView is a action view extension class. You can register it with rails | |
# and use liquid as an template system for .liquid files | |
# | |
# Example | |
# | |
# ActionView::Base::register_template_handler :liquid, LiquidView | |
class LiquidView | |
PROTECTED_ASSIGNS = %w( template_root response _session template_class action_name request_origin session template | |
_response url _request _cookies variables_added _flash params _headers request cookies | |
ignore_missing_templates flash _params logger before_filter_chain_aborted headers ) |
SSH into Root
$ ssh [email protected]
Change Root Password
# Speed things up by not loading Rails env | |
config.assets.initialize_on_precompile = false |
<% flash.each do |type, message| %> | |
<div class="alert <%= bootstrap_class_for(type) %> alert-dismissable fade in"> | |
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> | |
<%= message %> | |
</div> | |
<% end %> |