当前位置: 首页 > 知识库问答 >
问题:

无法启动rails服务器:在SDK中找不到rails/无法激活bundler-1.25.5

鲍鸿波
2023-03-14

我使用的是jetbrains的rubymine,当试图通过单击run-->run'development:helloworld'来运行rails server时,它的意思是:

运行开发时出错:HelloWorld:[SDK中找不到Rails]

我签入了文件-->默认设置...-->语言和框架-->Ruby SDK和gems,我按照预期使用RBENV 2.3.1,每个gems都是最新的,我不必更新它们。所以我尝试通过运行

rails server

在终端机上,我得到了一个错误列表:

$ gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.6
- RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-darwin15]
- INSTALLATION DIRECTORY: /Users/emilychiu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
- USER INSTALLATION DIRECTORY: /Users/emilychiu/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /Users/emilychiu/.rbenv/versions/2.3.1/bin/ruby
- EXECUTABLE DIRECTORY: /Users/emilychiu/.rbenv/versions/2.3.1/bin
- SPEC CACHE DIRECTORY: /Users/emilychiu/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/emilychiu/.rbenv/versions/2.3.1/etc
- RUBYGEMS PLATFORMS:
  - ruby
  - x86_64-darwin-15
- GEM PATHS:
   - /Users/emilychiu/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0
   - /Users/emilychiu/.gem/ruby/2.3.0
- GEM CONFIGURATION:
   - :update_sources => true
   - :verbose => true
   - :backtrace => false
   - :bulk_threshold => 1000
- REMOTE SOURCES:
   - https://rubygems.org/
- SHELL PATH:
   - /Users/emilychiu/.rbenv/versions/2.3.1/bin
   - /usr/local/Cellar/rbenv/1.0.0/libexec
   - /Users/emilychiu/.rbenv/shims
   - /Users/emilychiu/.rbenv/bin
   - /bin
   - /usr/bin
   - /sbin
   - /usr/sbin
   - /usr/local/bin
$ gem install --no-ri --no-rdoc bundler
Successfully installed bundler-1.12.5
1 gem installed
$ rbenv rehash
$ bundle --path=vendor/bundle
Using rake 11.2.2
Using concurrent-ruby 1.0.2
Using i18n 0.7.0
Using minitest 5.9.0
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using pkg-config 1.1.7
Using rack 2.0.1
Using nio4r 1.2.1
Using websocket-extensions 0.1.2
Using mime-types-data 3.2016.0521
Using arel 7.1.1
Using byebug 9.0.5
Using coffee-script-source 1.10.0
Using execjs 2.7.0
Using method_source 0.8.2
Using thor 0.19.1
Using debug_inspector 0.0.2
Using ffi 1.9.14
Using multi_json 1.12.1
Using rb-fsevent 0.9.7
Using puma 3.6.0
Using bundler 1.12.5
Using sass 3.4.22
Using tilt 2.0.5
Using spring 1.7.2
Using sqlite3 1.3.11
Using turbolinks-source 5.0.0
Using tzinfo 1.2.2
Using nokogiri 1.6.8
Using rack-test 0.6.3
Using sprockets 3.7.0
Using websocket-driver 0.6.4
Using mime-types 3.1
Using coffee-script 2.4.1
Using uglifier 3.0.1
Using rb-inotify 0.9.7
Using turbolinks 5.0.1
Using activesupport 5.0.0
Using loofah 2.0.3
Using mail 2.6.4
Using listen 3.0.8
Using rails-dom-testing 2.0.1
Using globalid 0.3.7
Using activemodel 5.0.0
Using jbuilder 2.6.0
Using rails-html-sanitizer 1.0.3
Using spring-watcher-listen 2.0.0
Using activejob 5.0.0
Using activerecord 5.0.0
Using actionview 5.0.0
Using actionpack 5.0.0
Using actioncable 5.0.0
Using actionmailer 5.0.0
Using railties 5.0.0
Using sprockets-rails 3.1.1
Using coffee-rails 4.2.1
Using jquery-rails 4.1.1
Using web-console 3.3.1
Using rails 5.0.0
Using sass-rails 5.0.6
Bundle complete! 15 Gemfile dependencies, 63 gems now installed.
Bundled gems are installed into ./vendor/bundle.

共有1个答案

李弘光
2023-03-14

要在Rubymine中运行Rails server,请使用热键Ctrl+Alt+R而不是run菜单(请参见此手册https://www.jetbrains.com/help/ruby/2016.2/running-rails-server.html)。

在Rubymine之外,您的最新捆绑程序似乎是1.13.0.rc.1,而(可能)gemfile.lock正在寻找1.12。尝试gem uninstall bundler-v1.13.0.rc.1,然后再次运行bundle exec rails serverbundle exec rails s

 类似资料:
  • 问题内容: 我已经安装了rails和mysql。我还安装了mysql2 gem。我通过命令rails new try_cms -d mysql创建了Rails应用程序。创建成功。但是,当我尝试使用rails server命令运行WEBrick服务器时,出现以下错误。 提前致谢。 问题答案: 尝试运行此命令(在此处查看类似的问题)

  • 我试图运行rails服务器,出现了这个错误! 命令提示符上的错误消息 Gemfile 宝石'Rails','4.2.6' gem'mysql2',' 创业板“sdoc”~ 宝石'tzinfo-data',平台:[: mingw,: mswin,:x64_mingw,: jruby]

  • 问题内容: 我知道,我不是第一个遇到此问题的人,但是我尝试了很多解决方案,但发现没有人起作用……也许您可以找到错误 错误(在没有.class和/.Client的情况下也会出现此错误,具体取决于其他设置) 12-02 16:40:15.359:W / ActivityManager(74):无法启动服务意图{act = com.android.fh.EnOceanApp.Client.class}:

  • 有很多类似的问题,但都略有不同。 Gemfile: Rails 4.2.6并在返回的命令行中执行: <code>PG::ConnectionBad(无法连接到服务器:没有这样的文件或目录。服务器在本地运行并接受Unix域套接字上的连接“/tmp/.s.PGSQL.5432”? 在启动rails服务器并尝试加载根路径之后,在浏览器中也得到了相同的结果。 我发现在命令行中执行也不起作用,返回:

  • 无法启动nginx服务器OS:ubuntu服务器16.04 systemctl status nginx.status抛出此消息:nginx.service-高性能web服务器和反向代理服务器加载:加载(/lib/systemd/system/nginx.service;enabled;vendor preset:enabled)活动:失败(结果:exit-code)自UTC Thu 2016-1

  • 我正在亚马逊EC2和ubuntu上运行Kafka。首先,我尝试运行zookeeper服务器并创建一个测试主题。最终目的是将spark与Kafka结合起来进行情感分析。 当我尝试启动zookeeper服务器时,我收到以下警告,并且进程似乎没有结束,即键入此命令后,我没有看到shell提示:bin/zookeeper服务器启动。sh配置/zookeeper。属性 警告配置中未定义配置或未定义仲裁,以独