我正在尝试将一个文本文件解析为以句点结尾的句子,但像霍普金斯先生这样的名字会在匹配期间抛出错误警报.
正则表达式标识"." 但不是"先生"
为奖金,我也在使用!找到句子的结尾,所以我现在的正则表达式是/(!/./我想要一个包含我的答案的答案.
从RVM 1.8.7开始升级到Rails 3.OSX 10.5.8
Output:
josh-crewss-macbook:~ joshcrews$ gem install sqlite3-rubyBuilding native extensions. This could take a while...ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension.
/Users/joshcrews/.rvm/rubies/ruby-1.8.7-p174/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... no
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... no
checking for sqlite3_load_extension()... no
creating Makefile
make
gcc -I. -I. -I/Users/joshcrews/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/i686-darwin9.8.0 -I. -I/usr/local/include -I/opt/local/include -I/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -g -O2 -fno-common -pipe -fno-common -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn …Run Code Online (Sandbox Code Playgroud) 我正在编写一些规范来测试具有Rails生成器的gem中的模板文件.我想在下面的rspec规范中访问"admin_layout.html.erb":
require 'spec_helper'
describe "admin_layout.html.erb" do
it "has page title Admin" do
HERES WHERE I WOULD LOVE TO HAVE ACCESS TO "admin_layout.html.erb" AS A VARIABLE
end
end
Run Code Online (Sandbox Code Playgroud)