简体   繁体   中英

rails server command is not working “using weBrick” “rails”

I have searched or similar problems , but none of the solutions worked for me . I will describe the problem in details:

The server works as normal when i create a new rails app , our instructor have told us to replace the existing gem file with another -shown below- and run bundle or bundle update to resolve the gems

source 'https://rubygems.org'

gem 'rails', '4.2.3'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'therubyracer', platforms: :ruby
gem 'capybara', '~> 2.4.4'
gem 'poltergeist', '~> 1.6.0'
gem 'phantomjs', '~> 1.9.8.0'

# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a           debugger console
  gem 'byebug'
  gem 'spring'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'httparty'

The problem appear when I do replace the existing gem file with the new one ,the server don't work and here is my command line logs.

if you need any further information, leave a comment.

edit: more info >>>rails version installed 5.0.1

在此处输入图片说明

在此处输入图片说明

I have found a solution for the problem , and I want to leave it here ,so anyone have the same problem could use . The problem was that I had rails v5.0.1 installed , and that caused problems related to comparability with other gems , so I downgraded my rails to 4.2.3

1-first you need to run gem uninstall rails ,and gem uninstall railties

2-now , go ahead and install rails again ,you could search for rails 4.2.3 to download and install it or you could do this through the command , I'm working on windows and I don't know how the command looks on others ,but I believe it's something similar , you could try this gem install rails '4.2.3' and that it!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM