用rvm,添加.rvmrc:rvm 1.8.7
因为rvm需要加载环境变量,你需要修改上面的2个脚本之一:
sh
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".rvmrc" ]; then
source "$rvm_path/scripts/rvm"
source ".rvmrc"
fi
According to the NEWS, ruby 2.0.0-p0 is released in February. With the performance improvement, lower memory usage, feature enhancement, and back support to 1.9.3, Everyone is encouraged to upgrade to ruby2.0.
And here is the method about how to upgrade ruby under rvm:
For each .loading_image, place a loader gif in front of it.
I set the image to opacity 0.0, so the image is downloading, and user will not see this image.
after image loaded, hide the gif, and show the image.
The css is list below. I’m using sass + compass for clearer css:
classUser<ActiveRecord::Basedefself.has_modulenameeval" define_method :#{name} do @#{name} ||= User#{name.to_s.camelize}.new(self) end "endhas_module:accounthas_module:displayerhas_module:privacyhas_module:messageend