gpt4 book ai didi

ruby-on-rails - 尝试在 Dreamhost 的 VPS 上测试应用程序

转载 作者:行者123 更新时间:2023-12-03 16:20:36 26 4
gpt4 key购买 nike

我正在努力尝试在 DH 的 VPS 上启动一个简单的应用程序。

第 1 步:创建测试应用

$ rails new test app

第二步:修改config/environment.rb:

require File.expand_path('../application', __FILE__)

if ENV['RAILS_ENV'] == 'production' # don't bother on dev
ENV['GEM_PATH'] = '/home/feebzee/.gems' + ':/usr/lib/ruby/gems/1.8'
end

# Initialize the rails application
Testapp::Application.initialize!

应用程序在 3000 端口使用 webrick 运行良好。但如果我让乘客加载它,我会到达 Rails Welcome Aboard 页面,即使通过单击链接显示应用程序环境,它也会返回错误。

为了您的浏览乐趣,我附上了下面的错误消息。在此先感谢并去 RoR!!! :-)

Error message:
no such file to load -- bundler/setup

Exception class:
LoadError

Application root:
/home/feebzee/testapp



# Initialize the rails application
Testapp::Application.initialize!
# File Line Location
0 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
1 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
2 /home/feebzee/testapp/config/boot.rb 6
3 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
4 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
5 /home/feebzee/testapp/config/application.rb 1
6 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
7 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
8 /home/feebzee/testapp/config/environment.rb 2
9 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
10 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
11 config.ru 3
12 /var/lib/gems/1.8/gems/rack-1.3.4/lib/rack/builder.rb 51 in `instance_eval'
13 /var/lib/gems/1.8/gems/rack-1.3.4/lib/rack/builder.rb 51 in `initialize'
14 config.ru 1 in `new'
15 config.ru 1

最佳答案

您是否为您使用的环境安装了 bundler gem?

关于ruby-on-rails - 尝试在 Dreamhost 的 VPS 上测试应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7731568/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com