myrev的博客
myrev · 共 24 篇文章
C#混合IronRuby编程
C#编程中,业务部分由IronRuby来实现是一个不错的选择。 1. IDE: SharpDevelop http://www.icsharpcode.net/opensource/sd/ 2. IronRuby: http://ironruby.codeplex.com/releases 下载 IronRuby 1.1.1 Binaries 即可 3. 新建C#项目,然后引用 IronRuby Binaries下bin目录的DLL: IronRuby.dll IronRuby.Libraries.dll IronRuby.Libraries.Yaml.dll Microsoft.Dynam…
2011-01-26 20:36 · .Net · 评论(0) · C · C++ · Ruby · C# · 编程
Netbean 集成 CppUnit 问题
当使用Netbean搭配C++插件开发时,如果使用CppUnit进行测试,每添加一个测试有一定概率会破坏Makefile文件,导致找不到CppUnit: /home/programmer/workspace/InterviewTest/CppInterview/tests/SortClass.cpp:38: undefined reference to `CppUnit::SourceLine::SourceLine(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)' /ho…
2010-12-21 11:41 · C++ · 评论(0) · C · C++ · C# · Linux
Rails3利用whenever gem调度发送邮件
1. Install $ gem install whenever Or with Bundler in your Gemfile. gem 'whenever', :require => false 2. Getting Started $ cd /my/rails/app $ wheneverize . This will create an initial " config/schedule.rb " file you. config/schedule.rb # Learn more: http://github.com/javan/whenever set :output, "#{p…
2010-12-01 10:42 · Rails · 评论(0) · C · C++ · C# · Rails · capistrano
Rails3集成测试插件Rails-Carrot(二)
本篇简要介绍使用JRuby + RSpec + Rails-Carrot + Celerity 进行rails3项目的集成测试。 1. Install jruby > rvm install jruby 2. Rails Gemfile if defined?(JRUBY_VERSION) gem 'activerecord-jdbc-adapter', '1.0.2' gem 'jdbc-mysql', :require => false gem 'celerity' gem 'rails-carrot', :require => 'carrot' else gem 'mysql2' gr…
2010-11-03 11:59 · Ruby · 评论(0) · Ruby · MySQL · Rails · jruby · rspec
Rails3集成测试插件Rails-Carrot(一)
Rails-Carrot部分参考Capybara,支持原生的测试Gem驱动,主要是供喜欢用Celerity或者原生浏览器测试Driver。 支持远程,本地,本地外部ruby运行服务器 进行集成测试。 插件地址: http://github.com/sloanwu/carrot 简要介绍,以集成Celerity(需要使用JRuby)为例 You can use carrot with celerity, or another driver. 1. Rails Gemfile gem 'rails-carrot', :require => 'carrot' 2. add a celerity_h…
2010-11-03 11:40 · Ruby · 评论(0) · Google · Ruby · Rails · jruby · rspec
Nginx + Passenger -- RVM
Nginx + Passenger -- RVM You should install RVM. 1. > gem install passenger 2. > rvm wrapper 1.9.2 passenger #1.9.2 is the ruby version in RVM, you can use ree or other.. If you use passenger 2.X > rvm 1.9.2 --passenger Run RVM using your desired Ruby interpreter, and pass the '--passenger' option.…
2010-10-25 09:16 · Rails · 评论(0) · nginx · Ruby · Rails
Make Ruby Gem
How to make gem 1. Install echoe gem $ gem install echoe 2. make gem $ mkdir hello_world $ vi hello_world/Rakefile require 'rubygems' require 'rake' require 'echoe' Echoe.new('wkhtmltopdf_32_amd64', '0.0.1') do |p| p.description = "wkhtmltopdf support linux 32,64 and OSX 32" p.url = "http://github.…
2010-09-09 21:41 · Ruby · 评论(1) · Git · Ruby · Linux · rubygems · OSX
OpenId Authentication For Rails3
[align=center][size=xx-large]OpenId Authentication For Rails3[/size][/align] [b]1. Add Gem[/b] GemFile [code="java"] gem 'ruby-openid' gem 'rack-openid', '>=0.2.1', :require => 'rack/openid'[/code] [b]2. install open_id_authentication as a plugin[/b] [code="java"]cd vendor/plugins git clone git://g…
2010-09-01 22:00 · Ruby · 评论(0) · Git · Ruby · Flash · Rack · Rails
Ruby1.9.2 On Rails3.0.0
Ruby1.9.2 On Rails3.0.0 Required: sudo aptitude install bison sudo aptitude install libmysqlclient-dev sudo aptitude install libxml2-dev libxslt-dev sudo aptitude install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev 1. Install ruby 1.9.2 and rails3 -- In rvm You should…
2010-08-31 17:16 · Ruby · 评论(0) · Git · Ruby · Rack · Rails · rspec
CKEditor And Box window Note
C KEditor And Box window Note 1 . open a new page if( CKEDITOR.instances[element_id] ) # it will delete the CKEDITOR old instance from cache but it won't remove the CKEDITOR DOM (Because the new page has no CKEDITOR DOM, so we needn't destroy it, just use remove. If you use destroy method, it will …
2010-08-29 14:59 · Rails · 评论(0) · Cache · Chrome · Firefox
Install Apache & Passenger
How to Install Apache & Passenger 1. Install Apache sudo apt-get install apache2 2. Install Passenger sudo gem install passenger 3. Install Apache Passenger Module sudo passenger-install-apache2-module 4. Copy some information After Install The Apache 2 module was successfully installed. Please edi…
2010-08-14 16:45 · Rails · 评论(0) · Apache · EXT · Ruby · Rails · Security
Rails3RC Note
Rails3RC Notes 1. ruby script/COMMAND.... rails <command > Usage: rails COMMAND [ARGS] The most common rails commands are: generate Generate new code (short-cut alias: "g") console Start the Rails console (short-cut alias: "c") server Start the Rails server (short-cut alias: "s") dbconsole Start a …
2010-08-14 16:36 · Rails · 评论(0) · C · Git · Ruby · Rails · ActiveRecord
Ruby1.9.2RC On Rails3RC -- RVM
**Ruby1.9.2RC On Rails3RC -- RVM ** Install ruby 1.9.2RC and rails3RC -- In rvm You should install the git or ruby && gem Install rvm with Git > bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) Install rvm with gem >sudo gem install rvm >rvm-install Add this line to the end …
2010-08-14 16:33 · Rails · 评论(0) · Java · Ruby · Rack · Rails · rspec
Active Scaffold and JRails/jQuery
To use Active with scaffold with JRails you have to use a different JQUERY_VAR than $ In our controllers 1. set [code="java"]ActionView::Helpers::PrototypeHelper::JQUERY_VAR = ‘jQuery’ [/code] or [code="java"]ActionView::Helpers::PrototypeHelper.const_set(:JQUERY_VAR, 'jQuery') [/code] 2. in your l…
2010-07-29 19:58 · Rails · 评论(0) · HTML · Java · prototype · jQuery · JavaScript
Rails plugin Markdown
1. RDiscount http://github.com/rtomayko/rdiscount [code="java"]> sudo gem install rdiscount[/code] [b]Usage[/b] RDiscount implements the basic protocol popularized by RedCloth and adopted by BlueCloth: [code="java"]require 'rdiscount' markdown = RDiscount.new("Hello World!") puts markdown.to_html[/…
2010-07-28 21:47 · Rails · 评论(0) · HTML · Java · Rails