RubyGems 机架版本更新问题
我的服务设置有问题。我运行了 gem 文件的更新,现在当我启动服务(或 Sinatra)时,我收到此错误:
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rack 1.3.4, but your Gemfile requires rack 1.3.3. Using bundle exec may solve this. (Gem::LoadError)
我在网络上和 Stackoverflow 上看到了一些解决方案,它们都建议运行捆绑包更新,指定机架版本在gem文件中,删除gemfile.lock或运行bundle exec。
我已经尝试了所有这些,但没有成功。
至于bundle exec命令,rack和rake之间有区别吗?如果我像那里一样运行bunde exec rake:
您已经激活了机架 1.3.2,但您的 Gemfile 需要机架 1.2.3。考虑使用bundle exec
我刚刚收到一条消息,说没有运行rake 服务。
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
如果我尝试执行捆绑执行机架,我会收到一条 no such exec 消息。
bundler: command not found: rack
我已经重新运行捆绑安装/更新几次,每次我尝试启动我的服务项目时,它都无法启动并出现相同的错误。
另一方面,如果我需要最新的机架 1.3.4 并启动一个新项目,我会收到错误,但服务服务器可以工作。如果我在现有项目上运行服务服务器,服务器会启动但找不到页面。它说的是这样的:
/path/to/my/views/file.slim/path/to/my/views/file.slim
我的视图文件夹中正确文件的路径重复两次,因此不会加载...
I have a problem with my Serve set up. I ran an update of my gem files and now when I boot serve (or Sinatra) I get this error:
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
/Users/yannick/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/runtime.rb:31:in `block in setup': You have already activated rack 1.3.4, but your Gemfile requires rack 1.3.3. Using bundle exec may solve this. (Gem::LoadError)
I've seen a few solutions around the web and here on Stackoverflow, they all recommend to running bundle update, specify the rack version in the gem file, delete the gemfile.lock or run bundle exec.
I've tried all of them but to no avail.
As for the bundle exec command is there a difference between rack and rake. If i run bunde exec rake like in there:
I just get a message saying that there is no rake service running.
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
If I try to do a bundle exec rack, I get a no such exec message.
bundler: command not found: rack
I've re-run bundle install / update a few time and each time that i try to boot my serve project it fails to start with the same error.
On the other hand, if I require the latest rack 1.3.4 and start a new project, i get the error but the serve server works. If i run the serve server on my existing project, the server boot but can't find the pages. it says something like:
/path/to/my/views/file.slim/path/to/my/views/file.slim
the path to the correct file in my view folder get repeated twice and therefore doesn't load...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论