- 浏览: 356938 次
- 性别:
- 来自: Wen Zhou
最新评论
-
hotsunshine:
引用notifempty #增加日期作为后缀,不然会是一 ...
使用Linux的logrotate拆分rails的log -
songfantasy:
不错,我也遇到了。谢谢知道怎么安装多个rubygem版本吗?
uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) -
dhgdmw:
怎么那么便宜?
推荐一个免费HTML虚拟空间 -
wellee:
...
ruby库 - nokogiri -
wangzhongjie:
清晰明了,谢谢了
模版方法,策略模式和状态模式之间的区别
文章列表
Gem::InstallError: hoe requires SlimGems version >= 1.4. Try 'gem update --system' to update SlimGems itself.
An error occured while installing hoe (3.1.0), and Bundler cannot continue.
Make sure that `gem install hoe -v '3.1.0'` succeeds before bundling.
gem update --system 1.4.2
require
require File.join(File.dirname(__FILE__), 'path/to/file')
require_relative 'filename' # >= 1.9.2 OR 1.8 gem install require_relative
sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/opt/ruby-enterprise-1.8.7-2012.02/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in ...
引用
http://ihower.tw/blog/archives/5436/
curl https://raw.github.com/RobinWu/snippets/master/code/system_git_path.txt >> ~/.bashrc
source ~/.bashrc
引用
http://www.gbin1.com/technology/javautilities/20120610curl-introduction/
http://curl.haxx.se/download.html
1. 读取URL页面
以下命令用来读取一个URL地址内容,如下:
curl http://www.gbin1.com
读取https协议:
curl https://www.gbin1.com
读取一个web地址并且保存到一个文件中:
curl -o gbin1.html http://www.gbin1.com/
读取一个需要HTTP Basic ...
0 2 * * * export PATH=/home/agideo/.rvm/gems/ree-1.8.7-2011.03/bin:/home/agideo/.rvm/gems/ree-1.8.7-2011.03@global/bin:/home/agideo/.rvm/rubies/ree-1.8.7-2011.03/bin:/home/agideo/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games MY_RUBY_HOME=/home/agideo/.rvm/rubies/r ...
安装应用
sudo apt-get install apache2
sudo apt-get install gitweb
vi /etc/apache2/conf.d/gitweb
Alias /gitweb /usr/share/gitweb
<Directory /usr/share/gitweb>
Options FollowSymLinks +ExecCGI
AddHandler cgi-script .cgi
</Directory>
访问
http://localhost:80/gitweb/
thin config -C config/thin.yml -c /var/www/rails —port 3010 —servers 3 -e production
thin start -C config/thin.yml
Missing the Rails 2.3.8 gem. Please `gem install -v=2.3.8 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or c ...
引用
http://release.seleniumhq.org/selenium-core/1.0.1/reference.html
速度
setSpeed 500
打开页
open /
waitForPageToLoad
验证 DOM
waitForElementPresent //DIV[@id='btnDirectLr']
waitForElementPresent //DIV[text()='库存报表']
verifyElementPresent css=div#msg-div:contains("审核成功")
waitFor ...
vi config/environments/production.rb
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile"
# For nginx:
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect'
引用
http://seleniumhq.org/
https://github.com/RobinWu/selenium-demo
http://release.seleniumhq.org/selenium-core/1.0.1/reference.html
http://www.cnblogs.com/hyddd/archive/2009/05/22/1487346.html
安装 Selenium IDE
引用
http://seleniumhq.org/download/
http://release.seleniumhq.org/selenium-ide/1.4.1/seleni ...
HTML5检测技术 Moderniz
http://www.quanlei.com/2011/02/html5%E6%A3%80%E6%B5%8B%E6%8A%80%E6%9C%AF/
Modernizr Test Suite
https://github.com/Modernizr/Modernizr
http://modernizr.github.com/Modernizr/test/
引用http://hi.baidu.com/goglad/blog/item/a8bc3d2a8f93c8345243c1ac.html
问题
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/home/robin/.ssh/id_r ...
Rails 常用代码
- 博客分类:
- Ruby on Rails
paperclip default_url by assets
has_attached_file :photo, :styles => { :thumb => "100x100>" }, :default_url => ActionController::Base.helpers.asset_path('recipe_missing.jpg')
指定rails 版本 new
rails _2.3.4_ test_ar_base
to_json
ActiveRecord::Base.include_root_in_json = t ...
ssh 访问不需要密码
- 博客分类:
- Ubuntu
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
scp <user>@*.*.com:~/.ssh/id_rsa <user>.pem
ssh -i <user>.pem <user>@*.*.com