2016-11-23 2 views
1

나는 에서 일하고 있습니다. MacOS Sierra의 레일 5 어플인데 디지털 오션 VPS으로 생산 준비가 끝날 때까지 모든 것이 잘 진행되고있었습니다. 나는 가장 유명한 것 중 하나를 따랐다 Deploy Rails app tutorialCapistrano, 마침내 내 버그가 나온 후에, 내 앱이 생산 가동 중이었다.Rails 5 binstubs를 어떻게 복구 할 수 있습니까?

지역 환경에서 이제

내가 rails server를 실행하거나 rails console나는이 경고 있고 난 그 잘못가는 뭐죠를 수정하거나하는 방법을 모르겠어요.

Looks like your app's ./bin/rails is a stub that was generated by Bundler. 

In Rails 5, your app's bin/ directory contains executables that are versioned 
like any other source code, rather than stubs that are generated on demand. 

Here's how to upgrade: 

    bundle config --delete bin # Turn off Bundler's stub generator 
    rails app:update:bin   # Use the new Rails 5 executables 
    git add bin     # Add bin/ to source control 

You may need to remove bin/ from your .gitignore as well. 

When you install a gem whose executable you want to use in your app, 
generate it and add it to source control: 

    bundle binstubs some-gem-name 
    git add bin/new-executable 

=> Booting Puma 
=> Rails 5.0.0.1 application starting in development on http://localhost:3000 
=> Run `rails server -h` for more startup options 
Puma starting in single mode... 
* Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity 
* Min threads: 5, max threads: 5 
* Environment: development 
* Listening on tcp://localhost:3000 
Use Ctrl-C to stop 

이 버그는 무엇이고 어떻게 해결할 수 있습니까? 그리고 참조 할 수는 Capistrano 뭔가 것 같다하지만 난 솔루션입니다 그들이 말한 수행하고 그것이 작동하지 않거나 어쩌면 내가 올바른 방법으로 그것을 구현하지 않은 :

이 솔루션은 다음과 같습니다

1 .-

이 2.- binstubs을 생성하기 위해 config/deploy.rbset :bundle_binstubs, nil를 추가 (아니 었 내 경우 있음) linked_dirs에서 bin을 제거

일부 기사는 내가 발견

  1. https://github.com/capistrano/rails/issues/171
  2. https://github.com/capistrano/capistrano/issues/1675
  3. Rails 5 console not working when deploying with Capistrano
  4. https://github.com/capistrano/bundler/issues/45

난 정말 당신이 나에게 제공 할 수있는 도움의 모든 유형을 주셔서 감사합니다. 미리 감사드립니다.

답변

0

나는 이것이 조금 늦었다 고 알고 있지만, 나는 $ rails app:update을 실행할 수 있고, 나의 binstubs를 덮어 쓰거나 덮어 쓸 것임을 알았다. 시작하는 다른 모든 설정 파일들을 덮어 쓰는 것과 함께. 그러니 조심하십시오.

관련 문제