Проблема запуска Rails сервера - PullRequest
4 голосов
/ 03 сентября 2011

Только что начал в Rails.Я на Windows Vista, установил последнюю сборку ruby ​​от http://rubyinstaller.org/ и все прошло хорошо.

ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

Я запускаю:

gem update --system
gem sources -a http://gemcutter.org
gem install rails

Об ошибках не сообщалось.

rails --v
Rails 3.1.0

после этого я создал папку для своего проекта Rails и создал внутри него новое приложение Rails следующим образом:

rails new test
cd test
bundle install

(опять нет сообщений об ошибках)

Но когда я запускаю rails server Я получаю эту ошибку:

rails server
←[31mCould not find rails-3.1.0 in any of the sources←[
←[33mRun `bundle install` to install missing gems.←[0m

Я пытаюсь снова запустить bundle, но безуспешно ... После этого, если я снова набираю rails -v, я получаю ту же ошибкукак прежде.Я должен закрыть консоль Windows и снова открыть для rails -v, чтобы снова начать работать !!

Кто-нибудь испытывал это ?!Вы можете помочь?

Спасибо !!!

В соответствии с запросом содержимое файла gemfile:

source 'http://rubygems.org'

gem 'rails', '3.1.0'

# Bundle edge Rails instead:
# gem 'rails',     :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
end

gem 'jquery-rails'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
end

Результат установки пакета:

Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.0)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.2)
Using rack-cache (1.0.3)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.0)
Using actionpack (3.1.0)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0)
Using arel (2.2.1)
Using tzinfo (0.3.29)
Using activerecord (3.1.0)
Using activeresource (3.1.0)
Using ansi (1.3.0)
Using bundler (1.0.18)
Using coffee-script-source (1.1.2)
Using execjs (1.2.4)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using rdoc (3.9.4)
Using thor (0.14.6)
Using railties (3.1.0)
Using coffee-rails (3.1.0)
Using jquery-rails (1.0.13)
Installing rails (3.1.0)
Using sass (3.1.7)
Using sass-rails (3.1.0)
Using sqlite3 (1.3.4)
Using turn (0.8.2)
Using uglifier (1.0.2)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem
is installed.

1 Ответ

7 голосов
/ 03 сентября 2011

попробуйте bundle exec rails server вместо rails server

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...