rails
momoliu88
这个作者很懒,什么都没留下…
展开
-
rails笔记
erb模版: <%=和%>符号之间的内容则会被看作 Ruby 代码执行,执行的结果将被转换为字符串,并替换到文件中 <%=...%> 序列所在的位置。 <%和%>符号之间的内容则会被看作 Ruby 代码执行,执行的结果不被会被转换为字符串,并不会替换到文件中 <%...%> 序列所在的位置。 在erb模版中,可以随意访问...2012-12-09 20:43:31 · 64 阅读 · 0 评论 -
ruby rails —创建一个简单的应用
1. 创建应用say 在安装rails之后,在应用的目录下执行: rails say 在对应目录下会生成如下目录: 2.启动应用 ./script/rails s thin 使用thin服务器,并启动。 => Booting Thin => Rails 3.2.8 application starting in development on http://0...原创 2012-12-09 21:07:59 · 126 阅读 · 0 评论 -
rails错误记录
错误1 在创建rails的数据库时,rake db:create RAILS_ENV='development'出现如下错误: Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. /home/liuxiaoqin/ru...2012-12-10 13:02:40 · 244 阅读 · 0 评论 -
迭代式开发rails应用(一)
记录学习rails的过程。应用来自《web敏捷开发之道——应用rails进行敏捷web开发》 1. 创建app rails new test-depot --skip-bundle cd test-depot bundle install --local 修改GemFile,添加gem 'thin' 2.创建数据库表product ./script/rails gener...2012-12-10 16:48:48 · 101 阅读 · 0 评论 -
SAVEPOINT exception with Rails
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "SAVEPOINT": syntax error: SAVEPOINT active_record_1 这个错误折腾了近一天。 解决方法: http://stackoverflow.com/questions/7367274/rails-3-1-app-c...2012-12-11 15:15:57 · 110 阅读 · 0 评论 -
curl发送json到rails的方法
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"weather_query":{"mobile":"15610897869","username":"李四","area_code":"0578"}}'2013-06-03 19:50:00 · 172 阅读 · 0 评论