我正在尝试用capistrano部署Rails应用程序。它是基于Rails 5.1的。Ruby版本由rvm管理。我使用的是ruby2.2.3,手动创建了宝石集。这是deploy.rb
set :rvm_type, :user
set :rvm_ruby_version, '2.2.3@cardlove-api'
...
with RAILS_ENV: fetch(:environment) do
execute :rake, "webpacker:install"
end
因此,当Rails < 5.0时,它似乎起了作用。但是,当Rails >
我正试着用波旁宝石做我的CSS。它在我的开发中工作,但当我部署到登台时,当我试图访问主页时,它就会中断:
ActionView::Template::Error (File to import not found or unreadable: bourbon.
Load path: /usr/local/www/lal-staging/releases/20140127202905
(in /usr/local/www/lal-staging/releases/20140127202905/app/assets/stylesheets/application.css
我只使用rails 5 api,只使用应用程序。当我试图部署这个应用程序时,会出现错误
Tasks: TOP => deploy:assets:precompile
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as deploy@xxx.xxx.xxx: rake exit status: 1
rake stdout: Nothing written
rake stderr: rake aborted!
Don
我做了一个新的Rails 3.2应用程序。当我使用Capistrano部署它时,我在编译资源时得到一个错误。但是资产被编译了,应用程序按照它应该的方式进行了部署。
在服务器上,我在系统范围内安装了RVM,然后创建了:
User: skolemapicture (added to group rvm)
Deploy folder: /home/skolemapicture/site
.rvmrc in /home/skolemapicture/site/.rvmrc
我的deploy.rb配置如下所示(省略了与问题无关的行)
set :application, "skolemapict
我在我的生产环境中从命令提示符使用Mailer时遇到了问题。使用此命令
Mailer.function.deliver
给出此错误
Errno::ENOTDIR: Not a directory - /assets/
from /home/rails/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:35:in `initialize'
from /home/rails/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /h
我正在尝试第一次设置Capistrano部署,并且我想在我的开发目录中测试它,然后再在生产中尝试它。通常,我甚至不会在dev环境中使用Capistrano,但是我在部署时遇到了问题。看来卡皮斯特拉诺想:
A)运行bundle命令:bundle --without development test
和
B)在开发环境中运行rake assets:precompile。我不想这样。我为什么要这么做?如果我想这样做的话,也许在“阶段性”环境中,但肯定不是在开发模式中。
目前最大的障碍是它捆绑了认为它处于生产模式,因此跳过了当它在预编译资产时正确地使用开发环境时所需要的宝石。
编辑:下面是两个正在运行
我正在尝试部署一个rails 5.1 &使用AWS弹性Bean秸秆用webpacker创建的react应用程序。问题是我一直收到以下错误:
Webpacker requires Node.js >= 6.0.0 and you are using 4.6.0
我在电脑上使用Node 9.5.0。有什么建议吗?
环境
Rails 6.0.0
Ruby 2.6.0
Amazon Linux2
什么
当我部署我的rails应用程序时,发生以下错误
ActionView::Template::Error (Webpacker can't find application in /home/web/www/eloop-regular/public/packs/manifest.json. Possible causes:
1. You want to set webpacker.yml value of compile to true for your environment
unle
编辑: Docker版本17.12.0-ce,在OSX High Sierra 10.12.6上构建c97c6d6
我正在将webpacker包含到现有的rails 4.2项目中(有些部分仍然使用链轮),并且遇到了一些热重新加载的问题。我的应用程序是docker化的,我想有一个设置,在那里我可以编辑我的React代码,并在我的rails docker容器中对其进行编译和刷新,而无需重新构建(例如,docker-compose build)。
目前,我已经运行了webpack-dev-server,并正确编译了代码。webpack开发服务器()将从我的本地机器编译卷装载的代码,但是当我刷新我的r