2017-01-01から1年間の記事一覧
#Railsのコンソール立ち上げ $ rails c #以下、Railsのコンソールで入力 emails = User.all emails.each do |email| SampleNotifier.sample_mail(email).deliver_now end
コンテナの立ち上げ docker run オプション --name コンテナ名 イメージ名 コンテナ一覧表示 docker ps -a イメージ一覧表示 docker images DockerでWordPressを使うために、手っ取り早く打つコマンド $docker run --name wordpress_db -e MYSQL_ROOT_PASSWO…
何故か最初はグレーアウトしている。 bitbucket.org こちらに入り、右上のアバターをクリックして、出てきたメニューで「アカウントの管理」をクリック。 「Bitbucket プロフィール設定」にて、 ユーザー名 hoge (変更する) ここから適当にユーザー名を変更…
psql -d hoge # Postgresqlを、データベース hoge に指定して開く。同時に、ターミナルでコマンドが使えるようになる。 バックスラッシュの入力は、Option + ¥で入力可。
ぐぐったら出てこなかったのでメモ。ネストする必要がある。 <% @product.each do |p| %> <%= link_to image_tag(p.image.url), { :controller => :foo, :action => :bar, :id => p.id } %> <% end %>
VirtualBox Guest Additionsでトラブったら 〜How to update VirtualBox Guest Additions with vagrant〜https://gist.github.com/fernandoaleman/5083680 より抜粋# Start the old vagrant $ vagrant init centos-6.3 $ vagrant up# You should see a messa…
.bash_profileに追記する $ echo export aws_access_key_id=foo >> ~/.bash_profile $ echo export aws_secret_access_key=bar >> ~/.bash_profile .bash_profileを再読み込み $ source ~/.bash_profile サーバ再起動 herokuの場合 $ heroku login $ heroku …
$ rails new -d mysql Gemfileを以下の通り修正 gem 'mysql2', '0.3.18' gem 'sass-rails', '~> 4.0.2' Gmfileに以下を追記 gem 'pry-rails' gem 'compass-rails','~> 2.0' gem 'sprockets', '2.11.0' $ bundle update $ bundle install $ rake db:create