I am attempting to deploy my app to heroku via a windows 7 machine.
I've made it as far as git push heroku master without running into any major issues but when I try to rake the migrations i get the following error
$ heroku rake db:migrate --trace
rake aborted!
No such file or directory - /disk1/tmp/13403_23723015091620/.bundle/gems/specifi
cations/activesupport-2.3.8.gemspec
/disk1/home/slugs/211056_9194ad5_13a9/mnt/.bundle/environment.rb:178:in `read'
/disk1/home/slugs/211056_9194ad5_13a9/mnt/.bundle/environment.rb:178
/disk1/home/slugs/211056_9194ad5_13a9/mnt/.bundle/environment.rb:147:in `map'
/disk1/home/slugs/211056_9194ad5_13a9/mnt/.bundle/environment.rb:147
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/disk1/home/slugs/211056_9194ad5_13a9/mnt/config/../config/preinitializer.rb:3
/disk1/home/slugs/211056_9194ad5_13a9/mnt/config/boot.rb:28:in `load'
/disk1/home/slugs/211056_9194ad5_13a9/mnt/config/boot.rb:28:in `preinitialize'
/disk1/home/slugs/211056_9194ad5_13a9/mnt/config/boot.rb:10:in `boot!'
/disk1/home/slugs/211056_9194ad5_13a9/mnt/config/boot.rb:129
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /disk1/home/slugs/211056_9194ad5_13a9/mnt/Rakefile:4
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:238
3:in `raw_load_rakefile'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/home/slugs/211056_9194ad5_13a9/mnt/.bundle/gems/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
(in /disk1/home/slugs/211056_9194ad5_13a9/mnt)
I should mention, though it could be determined from the above code, that I am using bundler. Perhaps it is due to this.
I'm at a total loss as to what this could mean. I came across this SO thread, but all the fixes it presented I had already tried and they didn't work. I am beginning to appreciate why rails deployment is derided so. Any suggestions?
Did you already take a look on Heroku's documentation about Bundler at http://docs.heroku.com/bundler ?
Are you sure that your Gemfile and Gemfile.lock files are added to your git repository?
I'm able to duplicate this problem:
http://github.com/heroku/heroku/issues#issue/30
The same Rails app will deploy via OS X.
Related
I'm trying to setup a testing server with Redmine and GIT. I'm following this series of tutorials:
Setting up a Centralized Git Service
Setting up the Redmine Front End
Integrating Redmine and Gitolite
Fully Automating the Redmine Gitolite Integration
I'm installing the Gitolite plugin for Redmine, and I'm having some trouble getting it to work. I follow all the instructions, but when i run rake db:migrate_plugins I get this error:
/usr/share/redmine# RAILS_ENV=production rake db:migrate_plugins --trace
rake aborted!
GONE
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:191:in `deprecate'
/usr/lib/ruby/vendor_ruby/rake/rdoctask.rb:4
/usr/lib/ruby/vendor_ruby/rails/tasks/documentation.rake:5:in `require'
/usr/lib/ruby/vendor_ruby/rails/tasks/documentation.rake:5
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:15:in `load'
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:15
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:6:in `each'
/usr/lib/ruby/vendor_ruby/rails/tasks.rb:6
/usr/lib/ruby/vendor_ruby/rails/application.rb:292:in `require'
/usr/lib/ruby/vendor_ruby/rails/application.rb:292:in `initialize_tasks'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `instance_exec'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `each'
/usr/lib/ruby/vendor_ruby/rails/railtie.rb:184:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/engine.rb:424:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/application.rb:145:in `load_tasks'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `send'
/usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/redmine/Rakefile:7
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:581:in `raw_load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:87:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:86:in `load_rakefile'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:70:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling'
/var/lib/gems/1.8/gems/rake-10.0.2/lib/rake/application.rb:68:in `run'
/var/lib/gems/1.8/gems/rake-10.0.2/bin/rake:37
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
Before that, I had to do some variations:
I've installed the plugin into /usr/share/redmine/plugins instead of /usr/share/redmine/vendor/plugins.
I've run bundle install so it installs some missing dependencies.
And I don't know what's next. I've been reading the docs over and over, but this seems to be a Ruby/Rails versioning problem out of my control.
I'm running Rails 3.2.8, Redmine 2.1.2 on Ubuntu 12.04 from PPAs. Perhaps I should stop trying these versions and go for old good Rails 2.3.14 and Redmine 1.3.2?
So, long story short, I had o format and reinstall my OS hence all my dev utilities.
git env sorted.
DevKit was fine.
Sphinx/mysql fine.
Bundle installed perfectly.
Everything is gravy until I go to rake db:create and build my database.
Environment:
OS: Win7 64-bit
Ruby192
gem -v 1.8.24
rails 3.1.3
Now the problem, when I rake anything I get a pop-up window
ruby.exe - Entry Point Not Found
The procedure entry point rb_class_superclass could not be located in the dynamic link library msvcrt-ruby191.dll
I've tried clean installing ruby, clearing the gems and reinstalling. Stuck on what to do next.
trace output:
rake aborted!
no such file to load -- ruby/prof
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:74:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:74:in `rescue in block in require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:62:in `block in require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `each'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/runtime.rb:55:in `require'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler.rb:119:in `require'
E:/Documents/Websites/rails-app /trunk/config/application.rb:7:in `<top (required)>'
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
E:/Documents/Websites/rails-app/trunk/Rakefile:4:in `<top (required)>'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
C:/Ruby192/bin/rake:23:in `load'
C:/Ruby192/bin/rake:23:in `<main>'
I've seen similar issues raised but for different lines in the dll and relating to sqlite3. I'm not using sqlite3 at all though. I'm on mysql with the mysql2 connector.
Any help?
I think I figured this out.
In the gemfile I replaced:
gem "ruby-prof"
with:
gem "ruby-prof", "0.10.8"
and all of a sudden I was rolling onto the next issue, which was specifying my rake version. I think both issues are related to an incompatability between the gems and my rubygems verson (I'm guessing??). This is the only difference I could see between my laptop environment, my desktop environment and my production server.
Either way. Sorted!
I've never sent this one before. I'm configuring a new server with an existing application. Trying to run a migration and here's the output.
root#beta:/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010# RAILS_ENV=production rake db:migrate --trace
rake aborted!
private method `gsub' called for nil:NilClass
/usr/local/rvm/gems/jruby-1.6.6#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:77:in `require'
org/jruby/RubyArray.java:1614:in `each'
/usr/local/rvm/gems/jruby-1.6.6#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
/usr/local/rvm/gems/jruby-1.6.6#global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010/config/application.rb:7:in `(root)'
org/jruby/RubyKernel.java:1027:in `require'
/usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010/config/application.rb:4:in `(root)'
org/jruby/RubyKernel.java:1052:in `load'
/vol/opt/dev/capistrano/foo-alpha/releases/20120330233010/Rakefile:25:in `load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `run'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/jruby-1.6.6#foo/gems/rake-0.9.2.2/bin/rake:33:in `(root)'
org/jruby/RubyKernel.java:1052:in `load'
/usr/local/rvm/gems/jruby-1.6.6#foo/bin/rake:19:in `(root)'
Migrations on my local laptop and on an existing server are working fine. config/database.yml looks right. Database is up and running and I can connect to it. What is this?
I also just tested rails console and I'm also not able to get a console. Again a private method gsub called for nil:NilClass. It's somehow related to connecting to the database and I'm not sure how/why.
** UPDATE **
After adding some debug into runtime.rb, this is the exception that's being raised:
#<LoadError: no such file to load -- activerecord-jdbcmysql-adapter>
The messed up part is, it is installed:
# gem list |grep -i activerecord-jdbcmysql-adapter
activerecord-jdbcmysql-adapter (1.2.2)
Is this some kind of RVM or bundler bug?
** LAST UPDATE **
I installed Amazon Linux AMI (The other is running an Ubuntu) and cannot replicate this issue there.
This is a bug in bundler, it was reported for rvm-capistrano, please check your Gemfile and try removing / commenting some gems.
https://github.com/carlhuda/bundler/issues/1801
I want to use app from github , i cloned it ,
but when i try bundle install , it requires a gem file .
I copied my gem file from other Local app , 'bundle install ' is successfull , but when i try 'rake db:migrate' i see it:
rusik#rusik-K50AF:~/work/ruby/episode-119/blog$ rake db:migrate
rake aborted!
no such file to load -- initializer
(See full trace by running task with --trace)
rusik#rusik-K50AF:~/work/ruby/episode-119/blog$ rake db:migrate --trace
rake aborted!
no such file to load -- initializer
/home/rusik/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/home/rusik/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require'
/home/rusik/work/ruby/episode-119/blog/config/boot.rb:54:in `load_initializer'
/home/rusik/work/ruby/episode-119/blog/config/boot.rb:38:in `run'
/home/rusik/work/ruby/episode-119/blog/config/boot.rb:11:in `boot!'
/home/rusik/work/ruby/episode-119/blog/config/boot.rb:109:in `<top (required)>'
/home/rusik/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/rusik/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/home/rusik/work/ruby/episode-119/blog/Rakefile:4:in `<top (required)>'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/ home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/home/rusik/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
,
I tried to copy my db test.sqlite3 from my LOCAL app, but it doesn't work, the same problem.
So ,of'course, i tried rails server, but it doesn't work.
So , how to setup app from github?
It's rails 2 app, so there is no bundler at all. If you want to run it you should read README:
To setup the app, just run rake setup.
I'm trying to set up teamcity 5.0.2 to run my rails projects specs (just rake spec)
My setup is:
local git repo
rails app root in
side it (git_root/site_root)
my rake runner settings are:
path to rakefile: site_root/Rakefile
working directory: site_root
rake tasks: spec
attached reporters: rspec
everything else is default.
when I run the build i get the following output:
Checking for changes
Clearing temporary directory: /home/michaelbaldry/Downloads/TeamCity/buildAgent/temp/buildTmp
Checkout directory: /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41
Updating sources: server side checkout...
[Updating sources: server side checkout...] Building incremental patch for VCS root: local projects
[Updating sources: server side checkout...] Repository sources transferred
Starting build process in /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root
/usr/bin/ruby /home/michaelbaldry/Downloads/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rakerunner.rb --rakefile /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/Rakefile spec SPEC_OPTS=--require 'teamcity/spec/runner/formatter/teamcity/formatter' --format Spec::Runner::Formatter::TeamcityFormatter:matrix
(in /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root)
LoadError: no such file to load -- /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/config/../vendor/rails/railties/lib/initializer Stacktrace: /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/config/boot.rb:45:in `load_initializer' /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/config/boot.rb:38:in `run' /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/config/boot.rb:11:in `boot!' /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/config/boot.rb:109 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/Rakefile:4 /home/michaelbaldry/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `load' /home/michaelbaldry/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile' /home/michaelbaldry/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in `load_rakefile' /home/michaelbaldry/Downloads/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:621:in `standard_exception_handling' /home/michaelbaldry/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile' /home/michaelbaldry/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run' /home/michaelbaldry/Downloads/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:621:in `standard_exception_handling' /home/michaelbaldry/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /home/michaelbaldry/Downloads/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rake_ext.rb:357:in `run' /home/michaelbaldry/Downloads/TeamCity/buildAgent/plugins/rake-runner/lib/rb/runner/rakerunner.rb:79 Source: /home/michaelbaldry/Downloads/TeamCity/buildAgent/work/65c3a24ba4d13a41/site_root/Rakefile:4
Rake aborted!
Process exit code: 1
Build finished
any help is very much appreciated!
I had a similar problem. I clicked on the "Build Log" tab and was able to see more detail than the "Overview" tab.
I found a workaround:
gem uninstall test-unit
I can't say I like this solution but at least it worked. The Build Log lead me to google for uninitialized constant Test::Unit::TestResult::TestResultFailureSupport which lead me to another "uninitialized constant error" resource on stackoverflow.com which had the solution.