先日から、hamlジェネレータで遊んでいましたが、rails上でサンプルを動かしてみた。
$ rails new hamltest
$ cd hamltest
$ bundle install vendor/bundle
としたら、3行目の書き方は、deprecatedだってさ。
なので、言われた通りにしてみる。
$ bundle install --path vendor/bundle
...
Your bundle is complete! It was installed into ./vendor/bundle
うん、上出来。
で、Gemfile開いて、以下の1行を追加。
gem 'haml-rails'
で、
$ bundle install
からの
$ rails g controller sample index
って打ってみると、
create app/controllers/sample_controller.rb
route get "sample/index"
invoke haml
create app/views/sample
create app/views/sample/index.html.haml
invoke test_unit
create test/functional/sample_controller_test.rb
invoke helper
create app/helpers/sample_helper.rb
invoke test_unit
create test/unit/helpers/sample_helper_test.rb
invoke assets
invoke coffee
create app/assets/javascripts/sample.js.coffee
invoke scss
create app/assets/stylesheets/sample.css.scss
よしよし、erb -> hamlへと変わっている。
これで、localhost:3000たたいて動けばOK。
また、よくよく見ると、CoffeeScriptまでできるようになっているではないか!
これは、後ほど勉強しますか。
そういや、環境書いてなかったね。
------------------
MacOS Lion
ruby 1.9.2
Rails 3.2.3
------------------
ラベル
RoR
WSUS
MECM
SCCM
環境構築
WindowsServer2016
更新プログラム
Python
Eclipse
GAE
Macports
AWS
Django
GoCilpse
Hibernate
PeerCache
SQL
SSL
SchUseStrongCrypto
TLS
VPN
WindowsServer2019
bootstrap
emacs
gcc
git
go
haml
react
AmazonSES
Apache Derby
BranchCache
CB2207
CleanCode
Database
Defender
DeltaDownload
Edge
EffectiveJava
GPO
MAILER-DAMON
MCM
RC4
RDS
Report
ReportingServices
Route53
SQLServer2017
Spring
StreamCipher
SupportBlog
Vagrant
Wireshark
WorkMail
Xcode
amazon
android
ccmcache
certificate
gdb
golang
oauth
pg
registry
sup
w3wp
webapp
イネーブルメントパッケージ
インプレースアップグレード
バージョン管理
帯域外リリース
有効化パッケージ
東プレ
配布ポイント
0 件のコメント:
コメントを投稿