adama:code (master) robertjenkins$ vmc push
Would you like to deploy from the current directory? [Yn]: y
Application Name: grid_site
Application Deployed URL [grid_site.cloudfoundry.com]:
Detected a Rails Application, is this correct? [Yn]: y
Memory Reservation (64M, 128M, 256M, 512M, 1G) [256M]:
Creating Application: OK
Would you like to bind any services to 'grid_site'? [yN]: n
Uploading Application:
Checking for available resources: OK
Processing resources: OK
Packing application: OK
Uploading (38K): OK
Push Status: OK
Staging Application: ..Error 310: Staging failed: 'Staging plugin failed staging application:
ERROR: Error installing /var/vcap/data/stager/tmp/d20120319-6886-v05n7b/therubyracer-0.9.9.gem:
ERROR: Failed to build gem native extension.
/var/vcap/data/packages/dea_ruby18/6.1/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/var/vcap/data/packages/dea_ruby18/6.1/bin/ruby
/var/vcap/data/packages/dea_ruby18/6.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- libv8 (LoadError)
from /var/vcap/data/packages/dea_ruby18/6.1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from extconf.rb:7
Gem files will remain installed in /var/vcap/data/stager/tmp/d20120319-6886-v05n7b/gem_install_dir/gems/therubyracer-0.9.9 for inspection.
Results logged to /var/vcap/data/stager/tmp/d20120319-6886-v05n7b/gem_install_dir/gems/therubyracer-0.9.9/ext/v8/gem_make.out
/var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/gemfile_task.rb:103:in `block in install_gems': Failed installing therubyracer-0.9.9.gem (RuntimeError)
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/gemfile_task.rb:91:in `each'
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/gemfile_task.rb:91:in `install_gems'
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/gemfile_task.rb:47:in `install'
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/ge
ms/vcap_staging-0.1.44/lib/vcap/staging/plugin/gemfile_support.rb:35:in `compile_gems'
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/rails3/plugin.rb:54:in `block in stage_application'
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/rails3/plugin.rb:50:in `chdir'
from /var/vcap/packages/stager/stager/vendor/bundle/ruby/1.9.1/gems/vcap_staging-0.1.44/lib/vcap/staging/plugin/rails3/plugin.rb:50:in `stage_application'
from /var/vcap/packages/stager/stager/bin/run_plugin:19:in `<main>'
这种错误是因为js, 一般使用了saas 、less 就会出现这样问题,网上说用了v8,需要编译下,但是不知道行不行,如果你不用,你就不引用就绝没问题
然后需要额外加入几个gem
gem 'thin'
gem 'bundler'
gem 'rake'
然后修改文件
Edit config/environments/production.rb
and change
config.serve_static_assets = false
to
config.serve_static_assets = true
然后安装gem
记得把gem 安装到项目中
gem update
gem install --path vendor/plugins
gem package
然后vmc push , clound foundry会自动创建数据库,创建表,连接数据库,启动服务
然后如何操作数据库,vmc 会自动配置database.yml 如果需要查看数据库 可以看 http://blog.cloudfoundry.com/post/12928974099/now-you-can-tunnel-into-any-cloud-foundry-data-service
部署借鉴:http://support.cloudfoundry.com/entries/20757913-getting-a-rails-3-1-1-production-environment-working
分享到:
相关推荐
Ruby on Rails and J2EE
You should have some experience with basic Rails concepts and a cursory understanding of JavaScript, CSS, and SQL, but by no means need to be an expert. You'll learn how to install Postgres on your ...
This concise teaches you how to use the power of Docker and Kubernetes to deploy your Rails applications easily and efficiently. Docker and Kubernetes are increasing in popularity every day, but what ...
Beginning Google Maps Applications with Rails and Ajax, From Novice to Professional
Beginning Google Maps Applications with Rails and Ajax.pdf
Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional
Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional
kanban, Kanban 看板 is a Trello clone in Rails and Backbone.js.zip
RUBY的经典之作,对其在RAILS下开发写得很详细
You concentrate on creating the application, and Rails takes care of the details., Tens of thousands of developers have used this award-winning book to learn Rails. It’s a broad, far-reaching ...
This pioneering book is the first resource that deep dives into the new Rails 3 APIs and shows you how use them to write better web applications and make your day-to-day work with Rails more ...
Learn to build dynamic, interactive web applications using the two most important approaches to web development today: Ajax and the phenomenally efficient Ruby on Rails platform. This book teaches ...
NetBeans Ruby and Rails IDE with JRuby 2009,大家看标题就知道了啊。。好东西啊,刚得到就发上来了。。
learn how to create something visible with Rails before reaching the more difficult database models and controller code. With Learning Rails, you can start from the foundations of web design you ...
Rails, Angular, Postgres, and Bootstrap(2nd),电子书实战版
Your Ruby on Rails ...This new edition has been updated to Rails 5.2 and RSpec 3.7 and contains full coverage of new Rails features, including system tests and the Webpack-based JavaScript setup.
and Images in a Rails Application 55 Setting up 56 Styling typography 57 Aligning text 61 Text transformation 62 Blockquotes 62 Styling listing elements 64 Creating and styling buttons 67 Which ...
介绍Google Map,Rails的书。
Ruby on Rails is the revolutionary online programming tool that makes creating functional e-commerce web sites faster and easier than ever. With the intuitive, straightforward nature of Ruby and the ...