.htpasswdファイル作成 $ sudo htpasswd -c /etc/httpd/.htpasswd [ユーザー名] 例 $ sudo htpasswd -c /etc/httpd/.htpasswd test_userNew password: Re-type new password: Adding password for user test_user ユーザーを追加する場合は、"-c"オプション…
SVNリポジトリ変更 $ sudo vim /var/trac/[プロジェクト名]/conf/trac.ini[trac] repository_dir = /var/svn/[SVNリポジトリ名] リポジトリ同期 $ sudo trac-admin /var/trac/[プロジェクト名] repository resync "(default)" Subversionでコミットした時に…
[Apache]Tracの設定ファイルを修正 trac.conf $ sudo vim /etc/httpd/vhosts.d/trac.confWSGIScriptAlias / /var/trac/trac.wsgi <VirtualHost *:80> DocumentRoot /var/trac ServerName trac.example.com <Directory /var/trac> WSGIApplicationGroup %{GLOBAL} AuthType Digest AuthName "Authenti</directory></virtualhost>…
Nginxリバースプロキシ設定 $ sudo vim /etc/nginx/nginx.confuser nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_ty…
uWSGIインストール $ sudo yum install -y gcc-c++ $ sudo yum install -y python-devel $ sudo yum install -y libxml2-devel $ sudo easy_install pip $ sudo pip install uwsgi※ただのメモ書き
環境 Trac-0.12.3.ja2 Apache SQLite Python Pythonバージョン確認 $ paython --version Python 2.6.6 インストールされていない場合は以下でインストールする。 $ sudo yum install -y python mod_wsgiインストール $ sudo yum install -y mod_wsgi SQLite…
svn1.7_centos6_wandisco.sh #!/bin/bash # staging.opensource.wandisco.com echo WANdisco Subversion Installer for CentOS 6 echo Please report bugs or feature suggestions to staging.opensource.wandisco.com echo echo Gathering some information…
Gitをインストール Gitをインストール $ sudo yum install -y git Gitバージョン確認 $ git --versiongit version 1.7.1 tigをインストール tigとは、CUIなGitブラウザ RPMforgeリポジトリ導入 $ sudo rpm -ivh http://pkgs.repoforge.org/rpmforge-release/…
Nginxは公式にCentOS用のリポジトリが用意されているとのこと。以下のページにインストール方法が記載しているので参考にして、インストール。 http://nginx.org/en/download.html リポジトリの登録 $ sudo rpm -ivh http://nginx.org/packages/centos/6/noa…
yumでインストール出来るApache(httpd)のバージョンを確認する $ yum list | grep httpdhttpd.x86_64 2.2.15-15.el6.centos.1 @base httpd-tools.x86_64 2.2.15-15.el6.centos.1 @base httpd-devel.i686 2.2.15-15.el6.centos.1 base httpd-devel.x86_64 2.2…
yum設定 # yum -y update vimの設定 vimの全体設定を変更して利用しやすくします。 # vi /etc/vimrc# ファイルの最後に下記3行を追加します。 set ts=4 set nu autocmd FileType * set formatoptions-=ro 「set ts=4」 :タブの幅をスペース4つ分に設定する …
[VPS] CentOS 6.2 x86_64インストール OSの選択 CentOS 6.2 x86_64 VNCのキーマップ ja Virtio ON [Disc Found]画面 [Skip]を選択 インストールTOP画面 [Next]ボタンを選択 言語選択画面 「Japanese (日本語)」を選択 [Next]ボタンを選択 キーボード選択画面…
OS再インストール ミドルウェアの設定rootパスワード変更 rootログイン禁止 NTPNginx ApacheGit Subversion Tracrvm
KDDIの「CloudCore VPS」 http://www.cloudcore.jp/vps/ 何故借りたか: 会社の後輩にススメられて知って、価格やサービスを見て良いと思ったから。 契約期間は12ヶ月で、11,340円 月額換算で、945円 基本スペック: メモリ:2GB ディスク:100GB CPU:物理1…
MacBook AirにWindows7 64bitをBootcampで導入しようとしたら、パーティションも分け、インストールしようとしたら・・・ Remove disks or other media. Press any key to restart エラー?再起動したら、以下のメッセージがっがっがっ No bootable device -…
参考 http://namakesugi.blog42.fc2.com/blog-entry-141.html http://frtts.hatenablog.com/entry/20120308/1331200027 http://d.hatena.ne.jp/NowTom/20110728/1311834182 http://d.hatena.ne.jp/gan2/20120530/1338387974 XCodeをインストール AppStoreよ…
CSVディレクトリを作成 mkdir db/csv※必ず作る必要はないです。 作成したディレクトリにCSVファイルを配置する。書き方はこんな感じ db/csv/originals.csv 東方紅魔郷 ~ the Embodiment of Scarlet Devil.,とうほうこうまきょう,3 東方妖々夢 ~ Perfect Ch…
db/csv/originals.csv 東方靈異伝 ~ Highly Responsive to Prayers.,とうほうれいいでん はいりー れすぽんしぶ とぅ ぷれいやーず,2,1 東方封魔録 ~ the Story of Eastern Wonderland.,とうほうふうまろく ざ すとーりー おぶ いーすたん わんだーらんど,…
rails2.xとrails3.xでバリデーションの書き方が変わってます。rails2 validates_presence_of :title rails3 validates :title, :presence => true 参考 http://ayapii.hatenablog.com/entry/2012/02/09/125402 validates 存在チェック validates :title, :pr…
忘れがちなので、備忘録 config/locales/attributes.ja.yml ja: activerecord: models: user: 'ユーザー'
管理画面のタイトルの国際化 config/initializers/rails_admin.rb config.main_app_name = [I18n.t('site_title'), 'Admin'] config/locales/ja.yml ja: site_title: 'サイト名' Herokuにアップしたら、「translation missing: ja.site_title」になってしま…
DeviseのRspec 参考 http://d.hatena.ne.jp/naberon/20120121/devise_rspec
目的 管理画面を楽に作りたい! 参考 http://d.hatena.ne.jp/hichiriki/20120126 https://github.com/sferik/rails_admin/wiki インストール Gemfileに追記 gem 'rails_admin'gemをインストール bundle install 設定 rails g rails_admin:installマイグレー…
ユーザー一覧に表示させるもの user_name ユーザー名 user_id ユーザーID sign_in_count ログイン回数 last_sign_in_at 最終ログイン時刻 last_sign_in_ip 最終ログイン時のIPアドレス current_sign_in_ip 現在ログイン中のIPアドレス role 権限
ユーザー一覧が欲しい! 画面設計 各テーブル作成
ちょっと無理矢理だけど・・・できた。正直、確実に修正対象です。。。コントローラーを生成 rails g controller user/registrationDevise::RegistrationsControllerをオーバーライド app/controllers/user/registrations_controller.rb class User::Registr…
ruby 1.9.3p125の環境でruby-debugを動かすとエラーが起きる。どうやら、gemがまだruby 1.9.3に対応していないらしい。。。Gemfileに記述していた内容 group :development do gem 'ruby-debug19' gem 'ruby-debug-base19' end他のgemの記述は省略してます。 …
railsをアップデートGemfileのRailsを最新版に変更し、以下を実行 bundle update railsgemをアップデート bundle update
Github git init git commit -m 'first commit' git remote add origin https://github.com/shiroemons/touhou_arrange_chronicle.gitgit push -u origin master Heroku git push heroku masterheroku pg:reset SHARED_DATABASEheroku run rake db:migratehe…
Deviseオプション :database_authenticatable データベースでアカウントのパスワードを管理できるように :registerable ユーザーがアカウント作成、編集、削除できるように :recoverable パスワードの再問い合わせができるように :rememberable 自動的にログ…