Tag: 部署

尝试使用自定义buildpack时出错

我正在尝试在Heroku上使用phantom.js自定义buildpack( https://github.com/stomita/heroku-buildpack-phantomjs ) 我按照指示编写了一个项目 heroku create –stack cedar –buildpack http://github.com/stomita/heroku-buildpack-phantomjs.git 但是,当我这样做时,一切似乎都出错了。 我最初认为这是一些其他问题( Heroku运行rake db:迁移错误,“没有这样的文件加载 – bundler / setup” )但是在创建一个没有buildpack的新应用程序后实现它是导致问题的buildpack 。 基本上当我使用buildpack时,一切都会出错:我的进程都没有启动,捆绑进程不起作用等等。 我该如何解决这个问题?

Rails:Heroku部署首次失败

我认为问题是我使用的是SQLite3,所以我迁移到PostgreSQL但问题仍然存在。 该应用程序在本地工作正常 我用heroku打开我的应用程序,它给了我以下错误: Application Error. An error occurred in the application and your page could not be served. Please try again in a few moments. If you are the application owner, check your logs for details.. 我试图通过查看日志找到解决方案但失败了,所以我需要别人的帮助。 这是我的日志,我感谢任何帮助! 2012-11-19T00:55:37+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -R config.ru -e production -p 3545` 2012-11-19T00:55:39+00:00 […]

::的ActionView MissingTemplate

在将mysite部署到VPS后,我遇到了这个运行时错误。 请注意,在我的本地机器中,每件事情都运转良好。 当我尝试通过控制器路径访问任何视图时,请说PostsController #index 我收到了这个错误 Completed 500 Internal Server Error in 3ms ActionView::MissingTemplate (Missing template posts/index, application/index with {:handlers=>[:builder, :erb], :formats=>[:html], :locale=>[:en]}. Searched in: “/home//dev..com/releases/20120413023845/app/views” ): app/controllers/posts_controller.rb:7:in `index’ 我认为haml是问题的原因,但我还不确定。 我添加了hamlgem并捆绑了我的应用程序 gem ‘haml’ gem ‘haml-rails’ 更新: 当我将index.html.haml更改为index.html.erb并评论其工作的模板内容时,它忽略了application.html.haml布局而没有错误。 我注意到当cap命令运行时,应用程序没有编译我的hamls RAILS_ENV=production RAILS_GROUPS=assets assets:precompile Compiled application.js (1ms) (pid 15420) Compiled application.css (1ms) (pid 15420) Compiled application.js (1ms) (pid 15420) […]

Rails 3.1和Asset Pipeline:使用Capistrano进行部署时出现问题

我刚刚从Ruby on Rails 3.0.10切换到3.1.0,我想通过使用Capistrano gem来部署我的资产文件(我的本地机器是运行Snow Leopard的MacO,我的远程机器运行的是Ubuntu 10.04 Lucid)。 因此,正如官方指南中所写,我在我的Capfile取消注释load ‘deploy/assets’ ,如下所示: # Uncomment if you are using Rails’ asset pipeline load ‘deploy/assets’ 现在,当我运行cap deploy命令时,我收到以下错误(错误在底部解释): … * executing “cd //releases/20110925223032 && rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile” servers: [“”] [] executing command ** [out :: ] (in //releases/20110925223032) *** [err :: ] rake aborted! *** [err :: ] […]

从capistrano任务中调用多级capistrano任务

我有一个capistrano任务,它整合了Rails项目的多个阶段的部署。 例如: task :consolidated_task do build #creates a new release branch from master, #sets a variable with the relese branch name staging deploy.migrations production deploy.migrations end 这是从另一个上限任务调用多阶段任务的正确方法吗? 构建任务创建一个新的git分支并发布它。 新分支的名称将保存为capistrano变量。 然后,登台和生产阶段任务使用此变量来指定要部署的分支。 当此任务运行时,它会失败: fatal: working tree ‘/Users/’ already exists. /usr/local/lib/ruby/gems/1.8/gems/capistrano-2.5.19/lib/capistrano/recipes/deploy/strategy/copy.rb:99:in `initialize’: No such file or directory – /var/folders/3d/3dKYNUwQGOSLZFXsMF-uv++++TM/-Tmp-/20100802182750/REVISION (Errno::ENOENT) 我正在从我的本地机器推送源代码作为git存储库,并且部署机器无法相互通信。

像PHP一样热部署Ruby:FTP上传文件并立即生效

是否有可能像PHP一样热部署Ruby? 通常我使用FTP上传PHP文件,然后它会自动提供。 Ruby可以像这样热部署它的文件吗? 您的评论欢迎。

使用Capistrano在Dreamhost上部署Rails 3

我正在尝试使用Capistrano部署Rails应用程序(这是我第一次使用Capistrano)。 我有一个使用Ruby 1.8.7和Rails 3.0.3的Dreamhost私有服务器(根据http://rails.dreamhosters.com/ ) 我已经按照Dreamhost的Capistrano安装说明(http://wiki.dreamhost.com/Capistrano) 当我运行“cap deploy:migrations”时,我收到此错误: [out :: xxx.com] Could not find i18n-0.5.0 in any of the sources ** [out :: xxx.com] Try running `bundle install` 我是否认为在部署时,捆绑安装应该自动运行? 不完全确定i18n来自哪里,因为我没有在任何地方添加它。 有没有人经历过这个或者有任何经验将Rails 3部署到Dreamhost?

推送到Heroku失败:无法在任何来源中找到net-ssh-2.10.0。 无法通过Bundler安装gem

我尝试将我的应用程序推送到heroku但是出现以下错误: remote: —–> Using Ruby version: ruby-2.2.2 remote: —–> Installing dependencies using 1.9.7 remote: Running: bundle install –without development:test –path vendor/bundle –binstubs vendor/bundle/bin -j4 –deployment remote: Fetching gem metadata from https://rubygems.org/……….. remote: Fetching version metadata from https://rubygems.org/… remote: Fetching dependency metadata from https://rubygems.org/.. remote: Could not find net-ssh-2.10.0 in any of the sources remote: Bundler […]

Capistrano部署Wipes数据库?

我已经设法使用Capistrano将我的应用程序部署到生产中,但我不明白如何处理我的数据库。 我正在使用颠覆和乘客。 当我运行cap deploy时,新部署会重新启动所有内容。 它清除了添加到数据库的数据。 显然,必须有一个解决方案,但我很惊讶没有在网上找到关于如何处理这个问题的任何事情。 我已经阅读了Capistrano文档和许多教程。 我能找到的最好的是Advanced Rails食谱书,它讨论了如何将用户生成的内容放入共享目录中,但这并不完全正确。 在使用Capistrano进行部署时,如何处理数据库?

Capistrano 3部署要求SSH密码但不能输入密码

我正在尝试使用Capistrano 3来部署Rails 4应用程序。 #config valid only for Capistrano 3.1 lock ‘3.1.0’ set :application, ‘testapp’ set :scm, :git set :repo_url, ‘git@bitbucket.org:sergiotapia/testapp.git’ set :user, “deploy” # The user on the VPS server. set :password, “hunter2$$” set :use_sudo, false set :deploy_to, “/home/deploy/www/testapp” set :deploy_via, :remote_cache set :pty, true set :format, :pretty set :keep_releases, 1 set :rails_env, “production” set […]