foreman error while "Getting Started with Node.js on Heroku" - node.js

I am in the midst of "Getting Started with Node.js on Heroku", where I want to "Run the app locally" by:
$ foreman start web
(cf. https://devcenter.heroku.com/articles/getting-started-with-nodejs#run-the-app-locally)
It says:
/usr/local/foreman/lib/foreman/process.rb:54:in run': undefined methodspawn' for Process:Module (NoMethodError)
from /usr/local/foreman/lib/foreman/process.rb:53:in chdir'
from /usr/local/foreman/lib/foreman/process.rb:53:inrun'
from /usr/local/foreman/lib/foreman/engine.rb:356:in spawn_processes'
from /usr/local/foreman/lib/foreman/engine.rb:353:inupto'
from /usr/local/foreman/lib/foreman/engine.rb:353:in spawn_processes'
from /usr/local/foreman/lib/foreman/engine.rb:352:ineach'
from /usr/local/foreman/lib/foreman/engine.rb:352:in spawn_processes'
from /usr/local/foreman/lib/foreman/engine.rb:57:instart'
from /usr/local/foreman/lib/foreman/cli.rb:41:in start'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/command.rb:27:insend'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/command.rb:27:in run'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor.rb:359:in dispatch'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/base.rb:440:instart'
from /usr/bin/foreman:15
(Running on Mac OS 10.7.5)
Any ideas what may help? Thanks!

Check out https://github.com/ddollar/foreman/issues/473.
Seems to be related to an old version of foreman or ruby.

Related

RoR App: “The asset 'application.css' is not present in the asset pipeline”

Info:
Rails 6.1.4
Ruby 3.0.1
PostgreSQL 9.6
NodeJS 11.15.0
Yarn 1.22.5
when I start my APP I always got the same error:
I've tried all I saw in others posts but I can´t resolve this problem.
Any suggestions?
In config/environments/production.rb I added the following line:
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true
also I checked the following line:
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
With this configuration I can start my APP.
Did you tried to do the following on the server
RAILS_ENV=production bundle exec rake assets:precompile

System unable to find Balanced.js when running eb deploy?

I'm trying to deploy a node server to Elastic-BeanStalk, and I get this error.
ERROR: WindowsError :: [Error 3] The system cannot find the path specified: './node_modules\restify\node_modules\bunyan\node_modules\mv\node_modules\rimraf\node_modules\glob\node_modules\minimatch\node_modules\brace-expansion\node_modules\balanced-match\test\balanced.js'
I've looked for balanced and it is there. I've been able to deploy with out this error in the past, and I don't think I have made any changes since then.
I guess you'r on a windows env in the beanstalk, and maybe not on your dev computer ?
./node_modules\restify
The / then the \ seems strange to me.

ECONNREFUSED socket.io GRITS google game

I'm trying to set up the Google HTML 5 "Grits" on Mac OS X.
http://code.google.com/p/gritsgame/wiki/DeveloperSetUp
When I get to Actually run locally I'm getting this error:
$ sudo node games-server/main.js $*
info - socket.io started
SERVERID: nKmXj1MfcULEx31vTlBtmz+u
checkConnection: POST http://localhost:9100/register-controller -> FAILED due to Error: connect ECONNREFUSED
Will call checkConnection again in 3.2 seconds
I'm new to node, is there something I need to do to start the server first before I run this command?
I solved it:
You need to start app engine first:
dev_appserver.py --skip_sdk_update_check --backends . $*
Then you can run the node command
node games-server/main.js $*
(I'm not sure why the wiki has them in the opposite order.)

Active Merchant Rails 3.1.3 Error

I'm trying to use Active Merchant with a new Rails 3.1.3 app and I'm getting the following error:
rails plugin install git://github.com/Shopify/active_merchant.git
rails server
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/.rvm/gems/ruby-1.9.2-p290#rails3.1/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- active_utils (LoadError)
Got the same issue and it turn out to be adding gem 'active_utils' in your gem file.
Hope so this will solve your problem.
Thanks

Problem with node.js and Redis-server?

I intended to implement a chat feature in my rails application. After a brief backup work I found JUGGERNAUT is the best option. By going to through http://juggernaut.rubyforge.org/
I have successfully implemented the juggernaut in my application.
Presently I'm all set to implement chat feature and after a vigorous surfing over web I couldn't get good tutorial to implement it but I found the some part of implementation at http://www.golygon.com/2010/12/private-chat-room-in-ruby-on-rails-3-0/. I decided to follow it but initially to implement the tutorial we need to have redis server and node.js in our system. I installed both in my environment.
But I'm facing the following problem as follows:
If I try
redis-server, I'm getting the following error
[11440] 08 Aug 10:08:16 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[11440] 08 Aug 10:08:16 # Opening port: bind: Address already in use
and as per the tutorial
if I try
sudo node server.js, I'm getting the following error
[sudo] password for re5:
node.js:63
throw e;
^
Error: ENOENT, No such file or directory '/home/re5/Documents/task17/server.js'
at Object.openSync (fs:153:18)
at Object.readFileSync (fs:94:15)
at Module._loadScriptSync (node.js:468:39)
at Module.loadSync (node.js:338:12)
at Object.runMain (node.js:522:24)
at Array.<anonymous> (node.js:756:12)
at EventEmitter._tickCallback (node.js:55:22)
at node.js:773:9
As I don't know much about the redis and node I'm unable to figure out what was the problem regarding to this errors.
I'm stuck and couldn't go further as I'm not sure whether this two are configured perfectly or not.
currently I'm using rails 3.0.7 and ruby 1.8.7
Can any one help me out.
Well your first error is quite simple to understand.
[11440] 08 Aug 10:08:16 # Opening port: bind: Address already in use
This means that there is aready a server bound to that port and using it as a server, this can happen if you have other applications/servers running or if you try to have mutiple instances of the server run at one time. To fix this you need to stop the process and then start it back up again. You can usually do this by closing all of your terminal windows or using your operating systems process manager to terminate the process, if those methods dont work for you try shutting your computer down and starting it back up. If you are still unable to start the Redis server after this then there are some more steps we can take.
The next error is due to node.js not being able to find a file that it needs. Reinstalling node.js should fix this problem for you.
Let me know if this fixes your problem or if you need more help.

Resources