Dzieki za pomoc. Powoli trace wiare, ze sie uda :).
Podam wszystko co mam w plikach oraz podam jak najwiecej informacji. Moze gdzies cos mam zle wpisane.
Wiec tak, zaczynam od plikow:
Gemfile
[code]source ‘http://rubygems.org’
gem ‘rails’, ‘3.0.9’
gem ‘rake’, ‘0.9.2’
gem ‘heroku’
Bundle edge Rails instead:
gem ‘rails’, :git => ‘git://github.com/rails/rails.git’
gem ‘sqlite3-ruby’, ‘1.2.5’, :require => ‘sqlite3’
Use unicorn as the web server
gem ‘unicorn’
Deploy with Capistrano
gem ‘capistrano’
To use debugger
gem ‘ruby-debug’
Bundle the extra gems:
gem ‘bj’
gem ‘nokogiri’
gem ‘sqlite3-ruby’, :require => ‘sqlite3’
gem ‘aws-s3’, :require => ‘aws/s3’
Bundle gems for the local environment. Make sure to
put test-only gems in this group so their generators
and rake tasks are available in development mode:
group :development, :test do
gem ‘webrat’
end[/code]
Rakefile
[code]# Add your own tasks in files placed in lib/tasks ending in .rake,
for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path(’…/config/application’, FILE)
require ‘rake/file_utils’
require ‘rake/dsl_definition’
require ‘rake’
module ::DemoApp1
class Application
include Rake::DSL
end
end
module ::RakeFileUtils
extend Rake::FileUtilsExt
end
DemoApp1::Application.load_tasks[/code]
…kiedy robie ‘bundle update’ otrzymuje:
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ bundle update
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.9)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.9)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.9)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.9)
Using arel (2.0.10)
Using activerecord (3.0.9)
Using activeresource (3.0.9)
Using addressable (2.2.6)
Using bundler (1.0.15)
Using launchy (2.0.5)
Using rest-client (1.6.3)
Using term-ansicolor (1.0.6)
Using heroku (2.4.0)
Using rdoc (3.9.1)
Using thor (0.14.6)
Using railties (3.0.9)
Using rails (3.0.9)
Using sqlite3-ruby (1.2.5)
Your bundle is updated! Use `bundle show [gemname]` to see where a bundled gem is installed.
…nastepnie robie ‘HEROKU_SSL_VERIFY=disable heroku rake db:migrate’ i otrzymuje:
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ HEROKU_SSL_VERIFY=disable heroku rake db:migrate
(in /app)
rake aborted!
uninitialized constant Rake::DSL
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2482:in `const_missing'
/app/Rakefile:9:in `<class:Application>'
/app/Rakefile:8:in `<module:DemoApp1>'
/app/Rakefile:7:in `<top (required)>'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `load'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2373:in `raw_load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2007:in `block in load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:2006:in `load_rakefile'
/usr/ruby1.9.2/lib/ruby/1.9.1/rake.rb:1991:in `run'
/usr/ruby1.9.2/bin/rake:31:in `<main>'
Jesli chodzi o moj stack to:
[code]euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ heroku stack --all
aspen-mri-1.8.6
- bamboo-mri-1.9.2
bamboo-ree-1.8.7
bamboo-mri-1.9.1 (beta)
cedar (beta)[/code]
Nie mam zielonego pojecia co jest nie tak.
Jedyne co jest inaczej niz podales to nie mam wpisu ‘gem ‘pg’’ w Gemefile. Kiedy dokonalem tego wpisu to w trakcie robienia ‘bundle update’ wyskakiwaly straszne bledy.
…o to te bledy:
[code]euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ heroku stack --all
-bash: euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$: No such file or directory
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ aspen-mri-1.8.6
aspen-mri-1.8.6: command not found
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ * bamboo-mri-1.9.2
No command ‘app’ found, but there are 19 similar ones
app: command not found
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ bamboo-ree-1.8.7
bamboo-ree-1.8.7: command not found
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ bamboo-mri-1.9.1 (beta)
-bash: syntax error near unexpected token beta' euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ cedar (beta) -bash: syntax error near unexpected token
beta’
euts@euts:~/Jacka/Ruby/rails_projects/demo_app1$ bundle update
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using abstract (1.0.0)
Using activesupport (3.0.9)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.9)
Using erubis (2.6.6)
Using rack (1.2.3)
Using rack-mount (0.6.14)
Using rack-test (0.5.7)
Using tzinfo (0.3.29)
Using actionpack (3.0.9)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.2.19)
Using actionmailer (3.0.9)
Using arel (2.0.10)
Using activerecord (3.0.9)
Using activeresource (3.0.9)
Using addressable (2.2.6)
Using bundler (1.0.15)
Using launchy (2.0.5)
Using rest-client (1.6.3)
Using term-ansicolor (1.0.6)
Using heroku (2.4.0)
Installing pg (0.11.0) with native extensions /home/euts/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:551:in `rescue in block in build_extensions’: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/home/euts/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for pg_config… no
No pg_config… trying anyway. If building fails, please try again with
–with-pg-config=/path/to/pg_config
checking for libpq-fe.h… no
Can’t find the 'libpq-fe.h header
*** 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=/home/euts/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
–with-pg
–without-pg
–with-pg-dir
–without-pg-dir
–with-pg-include
–without-pg-include=${pg-dir}/include
–with-pg-lib
–without-pg-lib=${pg-dir}/lib
–with-pg-config
–without-pg-config
–with-pg_config
–without-pg_config
Gem files will remain installed in /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/pg-0.11.0 for inspection.
Results logged to /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/pg-0.11.0/ext/gem_make.out
from /home/euts/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in block in build_extensions' from /home/euts/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:in
each’
from /home/euts/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:504:in build_extensions' from /home/euts/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:180:in
install’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/source.rb:101:in block in install' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in
preserve_paths’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/source.rb:91:in install' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in
block (2 levels) in run’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in with_build_args' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in
block in run’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in block in each' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in
each’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in each' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in
run’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in install' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/cli.rb:270:in
update’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in run' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in
invoke_task’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in dispatch' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in
start’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/bundler-1.0.15/bin/bundle:13:in <top (required)>' from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/bundle:19:in
load’
from /home/euts/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/bin/bundle:19:in `’[/code]