上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 36 下一页
摘要: 原文地址: http://ndever.net/articles/linux/install-openbox-ubuntu-1304-1310openbox是我用过的轻量窗口中最好用的了。Step One -安装必要的包需要安装下面的包. There's a myriad of other packages we could of used but these works for me:openbox - Window managerobmenu - Openbox GUI menu editorobconf - Openbox GUI configuration tooltint2 阅读全文
posted @ 2014-02-20 09:23 怒杀神 阅读(2439) 评论(0) 推荐(0)
摘要: 系统需求首先确定操作系统环境,不建议在 Windows 上面搞,所以你需要用:Mac OS X任意 Linux 发行版本配置系统包$ sudo apt-get install -y build-essential openssl curl libcurl4-openssl-dev libre... 阅读全文
posted @ 2014-02-11 10:20 怒杀神 阅读(605) 评论(0) 推荐(0)
摘要: 在使用gem install 。。。的时候增加参数:--no-ri 可以不安装ri部分--no-rdoc 可以不安装rdoc部分 阅读全文
posted @ 2014-01-29 23:12 怒杀神 阅读(239) 评论(0) 推荐(0)
摘要: 加入set :port, 8888 #默认4567 阅读全文
posted @ 2014-01-29 22:34 怒杀神 阅读(385) 评论(0) 推荐(0)
摘要: 加入# 默认的bind是127.0.0.1set :bind, '0.0.0.0' #0.0.0.0之后你能通过lan访问这个服务器 阅读全文
posted @ 2014-01-29 22:30 怒杀神 阅读(348) 评论(0) 推荐(1)
摘要: 用Sinatra来做复杂的Web应用时,会出现若干个比较麻烦的点。要手工作成一个个的应用骨架。作成test 、view、public目录等等将Sinatra DSL集中在一个类中的话,画面数量增加时不能很好地进行管理,且文件会变得很大和Rails相比,没有面向form等的辅助工具,没有缓存(cache)机制等,有时不得不进行“车轮的再发明” 能弥补这种不足,并敏捷的,不失Sinatra优点的进行开发的一个解决方案是Padrinoframework。Padrino framework在Sinstra的基础上大体上提供了以下功能。Rails风格的MVC模式的导入丰富的Helper简单的邮件收发功能 阅读全文
posted @ 2014-01-29 22:28 怒杀神 阅读(450) 评论(0) 推荐(0)
摘要: $ gem install sinatra测试:$ subl app.rbapp.rb内容:require 'sinatra'get '/' do "Hello, World!"end运行服务器:$ ruby app.rb在浏览器中输入:localhost:4567,没问题的话就会显示Hello, World!基于类的宏来定义route的写法:require 'rubygems' #有没有都行,不影响require 'sinatra/base'class App<Sinatra::Base get  阅读全文
posted @ 2014-01-29 22:08 怒杀神 阅读(1373) 评论(0) 推荐(0)
摘要: 2. 使用脚手架快速搭建网页rails的脚手架可以快速生成应用程序的一些片段,如果你需要为一个资源创建一系列的控制器视图模型,那么脚手架就是你需要的工具3. 创建资源对于一个博客程序,你可以以生成一个Post资源脚手架开始:$ rails g scaffold post name:string title:string content:text 该命令将为你构建15个文件:文件 说明db/migrate/20101122214725_create_posts.rb创建posts表的迁移任务 (你的文件名称将包括一个不同的时间戳)app/models/post.rbPost 模型test/fi. 阅读全文
posted @ 2014-01-20 22:54 怒杀神 阅读(360) 评论(0) 推荐(0)
摘要: 构建rails项目--blog$ rails new blog --skip-bundle$ cd blog$ bundle --local$ bundle install #安装需要的包$ rake db:create #创建数据库$ rails s #启动服务器 Hello Rails$ rails g controller home index修改app/views/home/index.html.erb文件内容Hello, Rails如果有删除public/index.html修改config/routes.rb(应用程序路由设置)Blog::Application.routes.d. 阅读全文
posted @ 2014-01-20 22:26 怒杀神 阅读(251) 评论(0) 推荐(0)
摘要: 在浏览器中使用127.0.0.1:3000来访问 阅读全文
posted @ 2014-01-20 21:24 怒杀神 阅读(302) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 36 下一页