小弟初学 Ruby,也没用过Linux.在网上搜了好多关于开发环境的配置的文章,但总是和实际有点出入,找了N遍文章后,终于找到最简环境安装配置方法,分享下推荐用 Ubintu,感觉对于习惯用Windows新手来说,还是较好操作的。我们使用 RVM来安装管理 Ruby版本,以下操作都在终端命令操作运行...
分类:
系统相关 时间:
2015-02-10 12:58:40
阅读次数:
181
Rails连接远程mongo数据库报错:"Could not connect to a primary node for replica set #]>"配置文件内容如下:development: sessions: default: database: spider h...
分类:
其他好文 时间:
2015-02-09 09:18:25
阅读次数:
189
页面中本来设计一个按钮,功能是当按下时跳转到index方法,然后实现一段功能.关键是其中需要传递一个参数show_all,其值为true.
index方法中通过判断是否含有该参数来实现不同的逻辑,类似如下:if params[:show_all]
@products = Product.all
else
@products = Product.where("loca...
分类:
其他好文 时间:
2015-02-07 21:43:55
阅读次数:
163
rails项目中由于后期需求变化,需要在products数据库中增加一个字段来满足多国家商品的分类:rails g migration add_locale_to_products locale:string...
分类:
数据库 时间:
2015-02-07 18:59:22
阅读次数:
291
rails server (默认为开发环境)rails server -p503 -e production (指定为生产环境 ,并指定站点端口)rake RAILS_ENV=production assets:precompile --trace (预编译)intel app frame jque...
分类:
其他好文 时间:
2015-02-06 16:30:56
阅读次数:
191
Tram
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 10622
Accepted: 3877
Description
Tram network in Zagreb consists of a number of intersections and rails ...
分类:
其他好文 时间:
2015-02-05 14:59:17
阅读次数:
143
调用bootstrap css框架时,将bootstrap文件夹放入 vendor/assets/下 bootstrap文件结构如下: [shenma@localhost demo]$ ls vendor/assets/bootstrap/ css img js [shenma@localhost ...
分类:
Web程序 时间:
2015-02-05 11:07:09
阅读次数:
240
??
Description
There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time....
分类:
其他好文 时间:
2015-02-05 09:39:17
阅读次数:
136
这是本系列的第三篇,整个系列介绍了我们公司如何把基础框架从PaaS移植到Docker上。 第一篇:介绍了我们在接触Docker之前的探索过程。 第二篇:介绍了如何搭建一个内网安全的私有registry。 在这最后一篇,我们用...
分类:
其他好文 时间:
2015-02-04 22:00:15
阅读次数:
296
最近在接手一个手机项目。在搭建环境的过程中,遇到了一些问题,在下文中已做记录,并奉上个人的解决方案。开发环境 win2003 ; JetBrains RubyMine6.3.31、 下载最新版ruby,(rubyinstaller-2.0.0-p598.exe ,最新版)官网:http://ruby...