The following error appeared upon upgrading JRuby:
OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format
project_dir = "my_code_hub" | |
repos = Dir["#{project_dir}/*"] | |
success_pull = repos.map do |rep_path| | |
response = `cd #{rep_path}; git checkout master; git pull`; | |
print '=>' | |
rep_path.split('/').last if response.length > 0 | |
end; |
module Devise | |
module Models | |
module RemoteAuthenticatable | |
extend ActiveSupport::Concern | |
# | |
# Here you do the request to the external webservice | |
# | |
# If the authentication is successful you should return | |
# a resource instance |
# also you need to uncomment next line in Capfile | |
# require 'capistrano/rails/assets' | |
namespace :deploy do | |
namespace :assets do | |
Rake::Task['deploy:assets:precompile'].clear_actions | |
desc 'Precompile assets locally and upload to servers' | |
task :precompile do |
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) |
#restore .sql file to the database | |
mysql target-db-name < sql-file-name.sql -uuser -p | |
# [mysql dir]/bin/mysql -h hostname -u root -p | |
Create a database on the sql server. | |
mysql> create database [databasename]; | |
List all databases on the sql server. | |
mysql> show databases; |
#force push | |
git push -f | |
#track current branch to the remote | |
git push -u | |
git branch --set-upstream cmt origin/story/find_connections | |
#revert to the given saw | |
git revert <saw_id> |
rails new checkonce | |
cd checkonce | |
git init | |
git add . | |
git commit -m"init" | |
heroku login | |
gem install heroku |