小编Sal*_*ati的帖子

找不到您的 /home/rails/webapp/Gemfile.lock 所需的“捆绑程序”(2.1.4)。(Gem::GemNotFoundException) 运行 docker build

每当我尝试运行时docker build -t ruby-app .,我都会遇到这个问题,我收到以下错误:

Step 6/8 : RUN bundle install
 ---> Running in daa149748210
/usr/local/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /home/rails/webapp/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
        from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
        from /usr/local/bin/bundle:23:in `<main>'
The command '/bin/sh -c bundle install' returned a non-zero code: 1
Run Code Online (Sandbox Code Playgroud)

我的 Dockerfile 如下:

#Dockerfile    
FROM ruby:latest
ENV HOME /home/rails/webapp
RUN apt-get …
Run Code Online (Sandbox Code Playgroud)

rubygems ruby-on-rails bundler docker

7
推荐指数
1
解决办法
4387
查看次数

运行 Rails 系统测试的 M1 上的分段错误

我正在 MacBook M1 Big Sur 操作系统上的 Rails 应用程序中运行系统测试,它给了我一个分段错误错误。

\n

我正在使用通过安装的 Ruby 2.7.1rbenv

\n
\xe2\x9e\x9c which ruby\n/Users/sc/.rbenv/shims/ruby\n\xe2\x9e\x9c ruby -v\nruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [-darwin20]\n
Run Code Online (Sandbox Code Playgroud)\n

现在,每当我运行Rails系统测试时就会出现问题\n我们的系统测试配置了 headless_chrome Capybara 驱动程序,该驱动程序可能(不确定)与分段错误错误有关。

\n

这是我运行测试时得到的结果:

\n
    [BUG] Segmentation fault at 0x000000001b543e20\nruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [-darwin20]\n\n-- Crash Report log information --------------------------------------------\n   See Crash Report log file under the one of following:                    \n     * ~/Library/Logs/DiagnosticReports                                     \n     * /Library/Logs/DiagnosticReports                                      \n   for more details.                                                        \nDon't forget to include the above Crash Report log …
Run Code Online (Sandbox Code Playgroud)

ruby testing ruby-on-rails segmentation-fault apple-m1

6
推荐指数
1
解决办法
2581
查看次数