1,关于在rails new app_path时或者bundle install时出现的在bundle install阶段出现的json问题
深入发现缺少ruby.h,于是问题原因引出...没有安装ruby-devel,于是
#yum install ruby-devel...问题解决
2,启动rails时候失败,报错如下:
/usr/local/share/gems/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
追究问题根源在于找不到sqlite3_native,于是顺腾摸瓜...找出这个sqlite3_native
#find /usr/local/share/gems/gems/ -name sqlite3_native*
/usr/local/share/gems/gems/sqlite3-1.3.7/ext/sqlite3/sqlite3_native.so狐狸尾巴楼出来了...
我们在找到sqlite2.rb这个文件、看看里面是怎么个情况情况...
# support multiple ruby version (fat binaries under windows)
begin
RUBY_VERSION =~ /(\d+\.\d+)/
require "sqlite3/#{$1}/sqlite3_native"
rescue LoadError
require 'sqlite3/sqlite3_native'
end
require 'sqlite3/database'
require 'sqlite3/version'
如上所示,require需要找到sqlite3/sqlite3_native这个东东,但是sqlite3/这个路径显然不对,此时只要把如下这句修改一下即可:
require 'sqlite3/sqlite3_native'-----》》》 require '/usr/local/share/gems/gems/sqlite3-1.3.7/ext/sqlite3/sqlite3_native'
此时
#rails server
..........
congraduations!!!!success!!!