简体   繁体   English

尝试启动Rails服务器

[英]Trying to start rails server

I've cd in app root directory, and ran rails s. 我已经在应用程序的根目录中安装了cd,并运行了rails。 Then I get the error: 然后我得到错误:

Could not find gem 'rbczmq' in any of the gem sources listed in your Gemfile or available on this machine. 在您的Gemfile中列出的或本机上可用的任何宝石来源中找不到宝石'rbczmq'。

Installing the gem manually, with gem install rbczmq , had no success because of this: 由于以下原因,使用gem install rbczmq手动gem install rbczmq

ERROR: Error installing rbczmq: ERROR: Failed to build gem native extension. 错误:安装rbczmq时出错:错误:无法生成gem本机扩展。

 /home/iulian/.rvm/rubies/ruby-2.3.1/bin/ruby extconf.rb 

"./autogen.sh" autogen.sh: error: could not find libtool. “ ./autogen.sh” autogen.sh:错误:找不到libtool。 libtool is required to run autogen.sh. 运行autogen.sh需要libtool ZeroMQ autogen failed! ZeroMQ自动生成失败! * extconf.rb failed * Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. * extconf.rb失败*由于某些原因(可能缺少必要的库和/或头文件)而无法创建Makefile。 Check the mkmf.log file for more details . 检查mkmf.log文件以获取更多详细信息 You may need configuration options. 您可能需要配置选项。

Then, I presumed that it needs libtool . 然后,我认为它需要libtool I've tried to install it but it prompted that it is installed under the most recent version. 我尝试安装它,但是它提示它已安装在最新版本下。 I've search lastly that file, mkmf.log under the path ~/.rvm/gems/ruby-2.3.1/gems/rbczmq/ext/mkmf.log but with no success. 我最后搜索了文件mkmf.log ,位于路径〜/ .rvm / gems / ruby​​-2.3.1 / gems / rbczmq / ext / mkmf.log下,但没有成功。 In the others installed gems directories this file exists, so I suppose that I don't find it in this problematic gem because it hasn't finished installing. 在其他已安装的gems目录中,此文件存在,所以我想在这个有问题的gem中找不到该文件,因为它尚未完成安装。

This app is programmed using rails 4, and I am trying to run it using Rails 5. This is also the Gemfile: 这个应用程序是使用Rails 4编程的,我正在尝试使用Rails 5来运行它。这也是Gemfile:

source 'https://rubygems.org'

gem 'rails'
gem 'sqlite3'
gem 'tzinfo-data'
gem 'rbczmq'
gem 'iruby'
gem 'spring', group: :development

gem 'elasticsearch-persistence', :require => 'elasticsearch/persistence'

Which could be the problem and how could I solve it? 可能是问题所在,我该如何解决?

I had this problem once. 我曾经有这个问题。 Do this 做这个

sudo apt-get install libgmp-dev

or 要么

sudo apt-get install libgmp3-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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