上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页

2013年9月14日

CentOS 安装PostregSQL9.2 同时出现pg安装错误

摘要: 错误:Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/local/bin/ruby extconf.rb checking for pg_config... noNo pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_configchecking for libpq-fe.h... noCan't find th... 阅读全文

posted @ 2013-09-14 02:27 小浪鼓 阅读(734) 评论(0) 推荐(0) 编辑

2013年9月12日

CentOS 安装apache

摘要: yum 安装apacheyum –y install httpd设置开机启动chkconfig --levels 235 httpd on启动/etc/init.d/httpd start默认配置文件的目录/etc/httpd/conf/httpd.conf独立出配置文件 xxx.conf (通常是域名.conf)/etc/httpd/conf.d/*.conf启动apache时候这个文件就被读入到这个主配置文件中。 阅读全文

posted @ 2013-09-12 20:12 小浪鼓 阅读(178) 评论(0) 推荐(0) 编辑

CentOS 配置Rails开发环境

摘要: 1 安装mysqlyum install -y mysql mysql-server启动mysql$ /etc/init.d/mysqld start设置root密码,删除test数据库等 /usr/bin/mysql_secure_installation2 安装ruby 和 rubygems, ruby 1.9.2 以上自带rubygems 不用安装yum install -y ruby rubygems3 安装rvm,管理ruby的版本$ curl -L get.rvm.io | bash -s stable$ source ~/.bashrc$ source ~/.bash_profi 阅读全文

posted @ 2013-09-12 17:01 小浪鼓 阅读(290) 评论(0) 推荐(0) 编辑

2013年8月29日

facebook login issue

摘要: If enable the facebook account in settings, when change account can't open the session.-(void)fbResync{ ACAccountStore *accountStore; ACAccountType *accountTypeFB; if ((accountStore = [[ACAccountStore alloc] init]) && (accountTypeFB = [accountStore accountTypeWithAccountTypeIdentifier:AC 阅读全文

posted @ 2013-08-29 08:28 小浪鼓 阅读(675) 评论(0) 推荐(0) 编辑

2013年7月30日

Ruby require, load include 区别

摘要: Require, load用于文件, *.rbrequire一般用于加载库文件,load加在配置文件,ruquire可省略“.rb",它指挥在第一次时候载入,如在字require就被忽略load加载多次include 用于包含一个文件中的模块require 'webrick' include WEBrick # 可以不用 server = WEBrick::HTTPServer.new(...) server = HTTPServer.new(...) 当你修改一段代码,不用重启服务器,你的代码被reload,这就是load的作用。如果使用require的话多次req 阅读全文

posted @ 2013-07-30 11:12 小浪鼓 阅读(475) 评论(0) 推荐(0) 编辑

2013年7月29日

使用zsh 替换 bash

摘要: 摘自:http://macshuo.com/?p=676#wechat_redirectShell是Linux/Unix的一个外壳,你理解成衣服也行。它负责外界与Linux内核的交互,接收用户或其他应用程序的命令,然后把这些命令转化成内核能理解的语言,传给内核,内核是真正干活的,干完之后再把结果返回用户或应用程序。Linux/Unix提供了很多种Shell,常用的Shell有这么几种,sh、bash、csh等,想知道你的系统有几种shell,可以通过以下命令查看:cat /etc/shells 显示如下:/bin/bash/bin/csh/bin/ksh/bin/sh/bin/tcsh/bin 阅读全文

posted @ 2013-07-29 16:45 小浪鼓 阅读(21212) 评论(2) 推荐(0) 编辑

2013年7月28日

Unix/Linux 查看文件大小

摘要: ls -l help.html-rw-r--r-- 1 william wheel 40960 Jul 18 00:59 development.sqlite340960 就是文件的大小。du -h development.sqlite3 40K development.sqlite3这个更明了du -ch *.sqlite3 40K development.sqlite3 0B test.sqlite3 40K totaldu -sh 查看当前文件夹大小du -sh * | sort -n 统计当前文件夹(目录)大小,并按文件大小排序附送:du -sk filename 查看指定文件大小 阅读全文

posted @ 2013-07-28 13:12 小浪鼓 阅读(11568) 评论(0) 推荐(0) 编辑

2013年7月23日

Pry的安装

摘要: Pry 用于rails应用的调试在Gemfile中添加gem 'pry', :group =>:developmentbundle install即可。pry代替irb方法,直接运行:prypry代替rails console方法,运行:pry -r ./config/environment.rb调试rails方法:直接在要调试的地方添加”binding.pry”,”rails server”当运行到这行代码时会自动调出一个pry终端,可以在这里进行交互。退出调试用”exit-all”。如:参考 阅读全文

posted @ 2013-07-23 15:48 小浪鼓 阅读(506) 评论(0) 推荐(0) 编辑

为Gem 添加环境设定

摘要: 如果在测试环境中gem "rspec", :group => :test 当多个gem的时候group :test do gem "webrat" get "rspec" end 如果我们现在运行bundle install它将会为所有环境装上其所指定的gem。如果安装除了某一环境之外指定的gem之外的所有gem,可以使用--without选项。例如,除了test环境特定的gem都安装我们可以这么做:bundle install --without=test参考 阅读全文

posted @ 2013-07-23 15:17 小浪鼓 阅读(298) 评论(0) 推荐(0) 编辑

gem install 和 bundle 区别

摘要: bundle install在设置了所有包含在Gemfile中的东西。你也可以传递参数。如果在production模式下,你很清晰的区分了每个app需要的gems。gem install则安装在整个环境中了。本质上讲他们是没有区别的。 阅读全文

posted @ 2013-07-23 15:12 小浪鼓 阅读(6032) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 14 下一页

导航