Fedora 20을 사용 중이며 Ruby 버전 2.0과 Rails 버전 4.1.6을 설치했습니다. Fedora 20의 Ruby on Rails
나는rails new example
을 시도했지만이 오류를 가지고 : 나는
gem install json -v '1.8.1'
또는
sudo yum install json
시도
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.3.2
Using i18n 0.6.11
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
Gem files will remain installed in /home/sntr/.gem/ruby/gems/json-1.8.1 for inspection.
Results logged to /home/sntr/.gem/ruby/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
run bundle exec spring binstub --all
bundler: command not found: spring
Install missing gem executables with `bundle install`
을 ...하지만, 내가 레일을 실행할 수 없습니다 변경하지 않았다.
루비 헤더가 누락 된 것처럼 보입니다. 'sudo yum install ruby-devel' 다음에는'libxml2-devel'과'sqlite3-devel' (그리고'mysql-devel') 같은 몇 가지 다른 devel 패키지가 필요할 수 있습니다. MySQL을 사용하려는 경우 –
RHEL http://stackoverflow.com/questions/18918588/did-i-install-ruby-1-9-3-correctly-on-rhel에 대해 비슷한 질문이 있지만, 'ruby193-devel' 패키지를 원하지만 Ruby 2.0을 포함하고있는 Fedora에서'ruby-devel'을 사용하기를 원합니다. –