rails server报错如何解决?
ruby吧
全部回复
仅看楼主
level 3
f:\ruby\workspace\MyApp>rails server
undler could not find compatible versions for gem "activesupport":
In Gemfile:
rails (= 4.0.0) x86-mingw32 depends on
activesupport (= 4.0.0) x86-mingw32
jbuilder (~> 1.2) x86-mingw32 depends on
activesupport (>= 3.0.0) x86-mingw32
activesupport (>= 3.0) x86-mingw32
rails (= 4.0.0) x86-mingw32 depends on
activesupport (= 4.0.0) x86-mingw32
rails (= 4.0.0) x86-mingw32 depends on
activesupport (= 4.0.0) x86-mingw32
jquery-rails (>= 0) x86-mingw32 depends on
rails-dom-testing (~> 1.0) x86-mingw32 depends on
activesupport (< 5.0, >= 4.2.0.beta) x86-mingw32
jquery-rails (>= 0) x86-mingw32 depends on
rails-dom-testing (~> 1.0) x86-mingw32 depends on
rails-deprecated_sanitizer (>= 1.0.1) x86-mingw32 depends on
activesupport (>= 4.2.0.alpha) x86-mingw32
:\ruby\workspace\MyApp>
2015年09月05日 08点09分 1
level 3
自己顶起
2015年09月05日 08点09分 2
level 12
删掉 Gemfile.lock
再 bundle install
再 rails server
看看
2015年09月07日 15点09分 3
F:\ruby\workspace\myapp>rails server F:/ruby/workspace/myapp/Gemfile not found F:\ruby\workspace\myapp>
2015年09月14日 14点09分
F:\ruby\workspace\myapp>bundle install Could not locate Gemfile or .bundle/ directory
2015年09月14日 14点09分
删了报以上错
2015年09月14日 14点09分
level 3
F:\ruby\workspace\myapp>gem install json -v 1.8.3
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
E:/Ruby22/bin/ruby.exe -r ./siteconf20150914-10224-me449p.rb extcon
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
make: execvp: gcc: Bad file number
make: *** [generator.o] Error 127
make failed, exit code 2
Gem files will remain installed in E:/Ruby22/lib/ruby/gems/2.2.0/gems/j
for inspection.
Results logged to E:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/
n-1.8.3/gem_make.out
F:\ruby\workspace\myapp>e:
E:\>cd E:\ruby22installer
E:\ruby22installer>ruby dk.rb init
[INFO] found RubyInstaller v2.2.3 at E:/Ruby22
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
E:\ruby22installer>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
E:/Ruby22
E:\ruby22installer> ruby dk.rb install
[INFO] Skipping existing gem override for 'E:/Ruby22'
[WARN] Skipping existing DevKit helper library for 'E:/Ruby22'
E:\ruby22installer>gem install rdiscount --platform=ruby
Fetching: rdiscount-2.1.8.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing rdiscount:
ERROR: Failed to build gem native extension.
E:/Ruby22/bin/ruby.exe -r ./siteconf20150914-4776-13wdocj.rb extcon
checking for random()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessar
libraries and/or headers. Check the mkmf.log file for more details. Y
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=E:/Ruby22/bin/$(RUBY_BASE_NAME)
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:456:in `try_do': The compiler failed t
e an executable file. (RuntimeError)
You have to install development tools first.
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:541:in `try_link0'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:556:in `try_link'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:735:in `try_func'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:1020:in `block in have_fu
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:911:in `block in checking
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:351:in `block (2 levels)
ne'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:351:in `block in postpone
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:321:in `open'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:347:in `postpone'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:910:in `checking_for'
from E:/Ruby22/lib/ruby/2.2.0/mkmf.rb:1019:in `have_func'
from extconf.rb:5:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in E:/Ruby22/lib/ruby/gems/2.2.0/gems/r
2.1.8 for inspection.
Results logged to E:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/
scount-2.1.8/gem_make.out
E:\ruby22installer>f:
F:\ruby\workspace\myapp>rails server
Could not find gem 'byebug (>= 0) x86-mingw32' in any of the gem source
in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
F:\ruby\workspace\myapp>bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies............................................
Using rake 10.4.2
Using i18n 0.7.0
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
E:/Ruby22/bin/ruby.exe -r ./siteconf20150914-10204-mo0ftr.rb extcon
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
make: execvp: gcc: Bad file number
make: *** [generator.o] Error 127
make failed, exit code 2
Gem files will remain installed in E:/Ruby22/lib/ruby/gems/2.2.0/gems/j
for inspection.
Results logged to E:/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/
n-1.8.3/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot con
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
2015年09月14日 14点09分 4
1