bundler: failed to load command: puma - ruby

Im trying to run the heroku local command in CML heroku local. heroku local command allows you to boot the project locally in the same way that it will be once it's pushed to Heroku to troubleshoot problems in a local development environment. Ive tried deleting my Gemfile.lock and running bundle install again did not work. I also tried using command bundle exec heroku local and I'm still getting the same error message.
I installed ruby using home-brew through the CML. Output of ruby-v: ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [arm64-darwin21]. Output of file $(which ruby): Users/chris/.rubies/ruby-2.7.6/bin/ruby: Mach-O 64-bit executable arm64.
My GemFile:
source "https://rubygems.org"
ruby "2.7.6"
gem "sinatra", "~>1.4.7"
gem "sinatra-contrib"
gem "erubis"
group :production do
gem "puma"
end
My Gemfile.lock:
GEM
remote: https://rubygems.org/
specs:
backports (3.23.0)
erubis (2.7.0)
multi_json (1.15.0)
nio4r (2.5.8)
puma (6.0.0)
nio4r (~> 2.0)
rack (1.6.13)
rack-protection (1.5.5)
rack
rack-test (2.0.2)
rack (>= 1.3)
sinatra (1.4.8)
rack (~> 1.5)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
sinatra-contrib (1.4.7)
backports (>= 2.0)
multi_json
rack-protection
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
tilt (2.0.11)
PLATFORMS
arm64-darwin-21
DEPENDENCIES
erubis
puma
sinatra (~> 1.4.7)
sinatra-contrib
RUBY VERSION
ruby 2.7.6p219
BUNDLED WITH
2.3.26
Expected return value:
$ heroku local
forego | starting web.1 on port 5000
web.1 | Puma starting in single mode...
web.1 | * Listening on tcp://0.0.0.0:5000
web.1 | Use Ctrl-C to stop
Actual return value:
bundler: failed to load command: puma (/Users/chris/.gem/ruby/2.7.6/bin/puma)
4:29:41 PM web.1 | /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma.rb:14:in `require': dlopen(/Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma/puma_http11.bundle, 0x0009): tried: '/Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma/puma_http11.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma/puma_http11.bundle' (no such file), '/Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0
4:29:41 PM web.1 | > /lib/puma/puma_http11.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) - /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma/puma_http11.bundle (LoadError)
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma.rb:14:in `<top (required)>'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma/cli.rb:6:in `require_relative'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/lib/puma/cli.rb:6:in `<top (required)>'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/bin/puma:6:in `require'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/puma-6.0.0/bin/puma:6:in `<top (required)>'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/bin/puma:25:in `load'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/bin/puma:25:in `<top (required)>'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `load'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:58:in `kernel_load'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/cli/exec.rb:23:in `run'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/cli.rb:486:in `exec'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/cli.rb:31:in `dispatch'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/cli.rb:25:in `start'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/exe/bundle:48:in `block in <top (required)>'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/gems/bundler-2.3.26/exe/bundle:36:in `<top (required)>'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/bin/bundle:25:in `load'
4:29:41 PM web.1 | from /Users/chris/.gem/ruby/2.7.6/bin/bundle:25:in `<main>'
[DONE] Killing all processes with signal SIGINT
4:29:41 PM web.1 Exited with exit code null
Ive tried deleting my Gemfile.lock and running bundle install again did not work. I also tried using command bundle exec heroku local and I'm still getting the same error message.

When running your application locally on Apple Silicon and on production on Heroku then that means you are running your application on different platforms. And you have to make Bundler aware that it needs to be able to handle the required gems for all platforms.
While Bundler's generic ruby platform works in most cases, there are edge cases in which working with the platform-specific versions is required or preferred. For example, installing the libv8-node gem is extremely slow in Apple Silicon when not using the correct platform. Another example seems to be the puma gem you are using that explicitly requires the correct platform configuration to work.
Therefore, I suggest adding all platforms that you are currently using to the Gemfile. That ensures that you do not add gems that are not available for all platforms. And the ability to use platform-optimized versions should improve especially the compiling time of gems with C bindings.
I suggest adding all platforms you are using (according to the error message) to your Gemfile like this:
bundle lock --add-platform ruby x86_64 arm64
Then run bundle install again.
See the Bundler documentation about bundle platform and bundle lock.

I figured it out! So the problem was I was using x86_64 architecture but I needed to use arm64 architecture. I verified which architecture by using command uname -m. To switch to arm64 I used command env /usr/bin/arch -arm64 /bin/zsh --login.

Related

Jekyll serve doesn't open a port

I recently installed Jekyll after a lot of trouble and when I run bundle exec jekyll serve this is the output:
Configuration file: /Users/Michelle/Desktop/hacked-by-chel/_config.yml
Source: /Users/Michelle/Desktop/hacked-by-chel
Destination: /Users/Michelle/Desktop/hacked-by-chel/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 1.12 seconds.
Auto-regeneration: enabled for '/Users/Michelle/Desktop/hacked-by-chel'
------------------------------------------------
Jekyll 4.1.1 Please append `--trace` to the `serve` command
for any additional information or backtrace.
------------------------------------------------
It doesn't open a port.
I tried running bundle exec jekyll serve --trace, the output is
Michelle#Michelles-MacBook-Pro hacked-by-chel % bundle exec jekyll serve --trace
Configuration file: /Users/Michelle/Desktop/hacked-by-chel/_config.yml
Source: /Users/Michelle/Desktop/hacked-by-chel
Destination: /Users/Michelle/Desktop/hacked-by-chel/_site
Incremental build: disabled. Enable with --incremental
Generating...
Jekyll Feed: Generating feed for posts
done in 0.948 seconds.
Auto-regeneration: enabled for '/Users/Michelle/Desktop/hacked-by-chel'
bundler: failed to load command: jekyll (/usr/local/bin/jekyll)
Errno::EADDRINUSE: Address already in use - bind(2) for 127.0.0.1:4000
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:201:in `bind'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:201:in `listen'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:764:in `block in tcp_server_
sockets'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:227:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:227:in `foreach'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/socket.rb:762:in `tcp_server_sockets'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/utils.rb:65:in `create_listene
rs'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/server.rb:127:in `listen'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/server.rb:108:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/webrick/httpserver.rb:47:in `initializ
e'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:215:in `new'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:215:in `start_up_webrick'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:102:in `process'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `each'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_pro
gram'
/Users/Michelle/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
/Users/Michelle/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
/Users/Michelle/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
/Users/Michelle/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
/Users/Michelle/.gem/ruby/2.6.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
/Library/Ruby/Gems/2.6.0/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
/usr/local/bin/jekyll:23:in `load'
/usr/local/bin/jekyll:23:in `<top (required)>'
I also tried running jekyll --version and it says
The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby
but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle
lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for r
uby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bund
le lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby
but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --
add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
jekyll 4.1.1
How do I make Jekyll run?
Address already in use - bind(2) for 127.0.0.1:4000 check if any process using that port or using a different port:
jekyll serve --port 4001

Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)

I am using Ruby 1.8.7 and Rails 2.3.5 version . When I try to start the server it throws the below error.
When I list the gem its shows the rake there but of different version
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
bundler (1.1.3)
fattr (2.2.1)
git (1.2.5)
postgres-pr (0.6.3)
rack (1.0.1)
rails (2.3.5)
rake (0.9.2.2)
rush (0.6.8)
session (3.1.0)
Please help me to figure out this issue .
D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:90:in `materialize': Could not find rake-0.8.7 in any of the sources (Bundler::GemNotFound)
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `map!'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `materialize'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:127:in `specs'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/definition.rb:172:in `specs_for'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler/runtime.rb:11:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:114:in `setup'
from D:/ruby/lib/ruby/gems/1.8/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from D:/safecellweb/config/boot.rb:116:in `load_gems'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:164:in `process'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
from D:/safecellweb/config/environment.rb:10
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
from D:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
from D:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from script/server:4
Actually your rake version is 0.9.2
While your app required 0.8.7
so first uninstall rake 0.9.2 by this command
gem uninstall rake -v=0.9.2
then install rake 0.8.7 by this command
gem install rake -v=0.8.7
Hope your issue will be solve........
Run these commands the problem will fix
step 1:install rake gem install rake -v '0.8.7'
step 2: install bundler gem install bundler
step 3: bundle install
it will fix the issue..
Even I faced the same problem while running an application using RubyMine.
Steps taken by me:
1) I installed new Ruby on my machine.
2) Changed the path of Ruby in environment variables.
3) Changed the path of Ruby in RubyMine using following steps:-
a) Click File -> Settings -> Ruby SDK and Gems
4) Then ran bundle install

Issue when trying to run Node from Foreman on Lion - `exec': Permission denied error

I've followed the guide on Heroku's website to get a node server running using foreman:
http://devcenter.heroku.com/articles/node-js
I can successfully start up the node server if I load it directly, but as soon as I use Foreman in the Procfile, it errors with the following...
My-MacBook-Air:myDirectory digiguru$ foreman start
13:25:26 web.1 | started with pid 29046
13:25:26 web.1 | /usr/local/foreman/lib/foreman/process.rb:38:in `exec': Permission denied - /usr/local/foreman/bin/runner (Errno::EACCES)
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:38:in `fork_with_io'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:32:in `fork'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:32:in `fork_with_io'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:44:in `run_process'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:19:in `run'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:64:in `with_environment'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:18:in `run'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:17:in `chdir'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/process.rb:17:in `run'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/procfile_entry.rb:17:in `spawn'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/procfile_entry.rb:15:in `map'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/procfile_entry.rb:15:in `spawn'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/engine.rb:63:in `spawn_processes'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/engine.rb:61:in `each'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/engine.rb:61:in `spawn_processes'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/engine.rb:45:in `start'
13:25:26 web.1 | from /usr/local/foreman/lib/foreman/cli.rb:28:in `start'
13:25:26 web.1 | from /usr/local/foreman/vendor/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
13:25:26 web.1 | from /usr/local/foreman/vendor/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
13:25:26 web.1 | from /usr/local/foreman/vendor/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
13:25:26 web.1 | from /usr/local/foreman/vendor/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
13:25:26 web.1 | from /usr/local/foreman/vendor/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
13:25:26 web.1 | from /usr/bin/foreman:15
13:25:26 web.1 | process terminated
13:25:26 system | sending SIGTERM to all processes
Is there anything I can do to give Forman permission? I've tried sudo foreman start, but to no avail.
I am running in ruby version 1.9.3 (upgraded from version 1.8.7 installed on lion by default).
UPDATE
Running sudo foreman start after #user658619 installing heruko and foreman from ruby gems, we get...
/Users/digiguru/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find foreman (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /Users/digiguru/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/digiguru/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1208:in `gem'
from /Users/digiguru/.rvm/gems/ruby-1.9.3-p0/bin/foreman:18:in `<main>'
My environment...
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.15
- RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/digiguru/.rvm/gems/ruby-1.9.3-p0
- RUBY EXECUTABLE: /Users/digiguru/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
- EXECUTABLE DIRECTORY: /Users/digiguru/.rvm/gems/ruby-1.9.3-p0/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/digiguru/.rvm/gems/ruby-1.9.3-p0
- /Users/digiguru/.rvm/gems/ruby-1.9.3-p0#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
I got the same problem today. Did you install heroku thru heroku-toolbelt.pkg??
Try use gem to reinstall heroku and foreman.
sudo gem install heroku foreman
Basically to get it working I had unfortunatley mucked up my installations by having a mix of rubies and gems some of which required SUDO, some that didn't.
Fortunately the good people of the internet have solved this problem for you with a tool called RVM
RVM lets you deploy each project with its own completely self-contained and dedicated environment--from the specific version of ruby, all the way down to the precise set of required gems to run your application. Having a precise set of gems also avoids the issue of version conflicts between projects, which can cause difficult-to-trace errors and hours of hair loss.
http://beginrescueend.com/
First download RVM
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
You'll want to open a new terminal window after doing this.
Clean up. If you have weirdly installed gems you'll want to remove them. Go to your root directory and sudo get rid of them. You can see all of them with the gem list command
cd
sudo gem list
sudo gem uninstall foreman heroku
Install a ruby. You should do this in the subdirectory of your application. I chose 1.9.3
cd myApp
rvm install 1.9.3
Add any gems you need. For me that was just foreman and heroku.
cd myApp
gem install foreman heroku
Seemed to work a treat.
Try this. In Procfile, do
web: node ./bin/www

Exclude hoe gem dependency from Heroku

I am trying to push code to Heroku and it seems like the system gem "hoe" is somehow included by some other gem (geokit was one of them but no luck even after removing that gem from Gemfile). This is causing Heroku to fail because it cannot update system gems. how to solve this issue?
Installing geokit (1.5.0)
Installing geonames (0.2.2)
Installing hoe (2.9.1) /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:170:in `install': hoe requires RubyGems version >= 1.4. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError)
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
Just pin it in your Gemfile, I bet your dependent gems don't depend on 2.9.1. Add this:
gem 'hoe', '~> 1.5.1' # Heroku's rubygems is too old for hoe 2.9.1 as of 28 Mar 2011

Error building PostgreSQL gem with `budle install` [Ubuntu 10.04, Ruby EE]

I've Ruby Enterprise Edition installed on Ubuntu 10.04 as the default Ruby interpreter:
ruby 1.8.7 (2010-12-23 patchlevel 330) [i686-linux], MBARI 0x8770, Ruby Enterprise Edition 2011.01
If I sudo gem install pg, the gem is installed successfully.
But withing my Rails app, bundle install hangs up like that:
[...]
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.0.1)
Using capistrano (2.5.19)
Installing pg (0.10.1) with native extensions /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:529:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/ruby-enterprise-1.8.7-2011.01/bin/ruby extconf.rb
Gem files will remain installed in /home/selhozka/rails/vendor/gems/ruby/1.8/gems/pg-0.10.1 for inspection.
Results logged to /home/selhozka/rails/vendor/gems/ruby/1.8/gems/pg-0.10.1/ext/gem_make.out
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:482:in `each'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:482:in `build_extensions'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/site_ruby/1.8/rubygems/installer.rb:156:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:96:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in `run'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `send'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
from /opt/ruby-enterprise-1.8.7-2011.01/lib/ruby/gems/1.8/gems/bundler-1.0.10/bin/bundle:13
from /opt/ruby-enterprise-1.8.7-2011.01/bin/bundle:19:in `load'
from /opt/ruby-enterprise-1.8.7-2011.01/bin/bundle:19
The contents of /home/selhozka/rails/vendor/gems/ruby/1.8/gems/pg-0.10.1/ext/gem_make.out:
/opt/ruby-enterprise-1.8.7-2011.01/bin/ruby extconf.rb
It was a lack-of-memory issue with an OpenVZ VPS.
There was only 256 MB of RAM and OpenVZ doesn't provide you with swap space. So the script hang up.

Resources