2017-01-13 6 views
1

Я просто клонировал новое репо и установил пакет и установил пакет обновления. Я не знаю, почему я получаю следующую ошибку, когда я делаю bundle exec rails c. я пользуюсь рельсами версии 5.0.1не может загрузить консоль рельсов

bundler: failed to load command: rails (/Users/user123/.rbenv/versions/2.3.1/bin/rails) 
Gem::LoadError: railties is not part of the bundle. Add it to Gemfile. 
    /Users/user123/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.13.6/lib/bundler/rubygems_integration.rb:336:in `block (2 levels) in replace_gem' 
    /Users/user123/.rbenv/versions/2.3.1/bin/rails:22:in `<top (required)>' 

Я тоже в своем каталоге проектов. Кроме того, когда я делаю рельсы či получить

Usage: 
    rails new APP_PATH [options] 

Options: 
    -r, [--ruby=PATH] 
..... 

Gemfile выглядит, как показано ниже

Укажите зависимости вашего драгоценного камня в wellness_client.gemspec

gemspec 

gem 'roll_out','~> 1.10.0' 
gem 'roll_out-jira' 
gem 'philter', '~> 1.11.0' 

gem 'rake', '~> 11.0' 

# Call 'byebug' anywhere in the code to stop execution and get a debugger console 
gem 'byebug' 
# An IRB alternative and runtime developer console 
gem 'pry', '~> 0.9.12' 
# Walk the stack in a Pry session 
gem 'pry-stack_explorer', '~> 0.4.9' 
# Simple, feature rich ascii table generation library 
gem 'terminal-table', '~> 1.5', '>= 1.5.2' 
# Great Ruby dubugging companion: pretty print Ruby objects to visualize their structure. 
# Supports custom object formatting via plugins 
gem 'awesome_print', '~> 1.6', '>= 1.6.1' 

# BDD for Ruby 
gem 'rspec', '~> 3.1' 
# Code coverage for Ruby 1.9+ with a powerful configuration library and automatic merging of coverage across test suites 
gem 'simplecov', '~> 0.7.1' 
# factory_girl provides a framework and DSL for defining and using factories - less error-prone, 
# more explicit, and all-around easier to work with than fixtures. 
gem 'factory_girl', '~> 4.0' 
# Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc. 
gem 'faker', '~> 1.6', '>= 1.6.6' 

Благодарности

+0

делает рельсы -v'work? – mlabarca

+0

Можете ли вы разместить свой gemfile? – mlabarca

+0

есть. когда я делаю rails-v i get Rails 5.0.1 – User7354632781

ответ

0

Ваш Gemfile не имеет версии рельсов указано. railties - это зависимость рельсов, этого должно быть достаточно, чтобы указать версию рельсов, чтобы исправить это. Предположим, что проект был написан с рельсами 5 в виду, добавьте следующую строку в ваш Gemfile:

gem 'rails', '5.0.1' 

Теперь повторена bundle install и рельсы консоли/сервер должен работать.