I started a new ruby-on-rails project called "myrubyblog", changed directories to my project then launched rails server command, but the terminal then outputs me this after an incredible amount of lines of information I don't understand;
-- Other runtime information -----------------------------------------------
* Loaded script: bin/rails
* Loaded features:
0 enumerator.so
1 thread.rb
2 rational.so
3 complex.so
4 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/armv7l-linux-eabihf/enc/encdb.so
5 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/armv7l-linux-eabihf/enc/trans/transdb.so
6 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/armv7l-linux-eabihf/rbconfig.rb
7 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/compatibility.rb
8 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/defaults.rb
9 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/deprecate.rb
10 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/errors.rb
11 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/version.rb
12 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/requirement.rb
13 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/platform.rb
14 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/basic_specification.rb
15 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/stub_specification.rb
16 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/util/list.rb
17 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/armv7l-linux-eabihf/stringio.so
18 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/rfc2396_parser.rb
19 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/rfc3986_parser.rb
20 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/common.rb
21 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/generic.rb
22 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/ftp.rb
23 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/http.rb
24 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/https.rb
25 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/ldap.rb
26 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/ldaps.rb
27 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/mailto.rb
28 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri.rb
29 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/specification.rb
30 /home/pi/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/rubygems/exceptions.rb
... (up to 320 lines)
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Abandon
What is that supposed to mean?
Related
I have a process Id in windows Machine, I need to write a Power-shell script to check whether this process is running as docker container or not.
Being a newbie ,I am not able to find anything straight forward how to check it.
I have tried this by expanding the suggestion to use docker inspect.
Here's the whole config:
PS C:\Users\Microsoft> docker inspect -f '{{.State.Pid}}' 8b2f6493d26e
4492
The command above returned the ID on which the container is instantiated.
PS C:\Users\Microsoft> Get-Process -Id 4492 | select si
SI
--
6
Now, I can use the above to query the SI of the specific ID returned previously. You see that the SI for that Process ID is 6, so all processes on this container will be running on that SI. Now I can run:
PS C:\Users\Microsoft> Get-Process | Where-Object {$_.si -eq 6}
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
83 6 976 4776 0.00 8380 6 CExecSvc
251 13 2040 6308 0.16 7308 6 csrss
38 6 792 3176 0.00 3772 6 fontdrvhost
793 20 3900 13688 0.44 8912 6 lsass
232 13 2624 10384 0.11 7348 6 msdtc
75 6 928 4872 0.02 4492 6 ServiceMonitor
213 10 2372 7008 0.27 8308 6 services
137 8 1496 6952 0.05 864 6 svchost
172 12 2656 9292 0.06 2352 6 svchost
110 7 1188 6084 0.03 2572 6 svchost
241 14 4616 12508 0.19 5460 6 svchost
817 30 12388 30824 9.73 6056 6 svchost
172 12 3984 11528 0.14 6420 6 svchost
405 16 7284 14284 0.25 6524 6 svchost
494 22 13480 29568 1.45 7060 6 svchost
509 38 5636 19432 0.30 7936 6 svchost
334 13 2776 10912 0.13 8604 6 svchost
122 8 3048 9180 0.19 8816 6 svchost
383 14 2392 8624 0.22 9080 6 svchost
232 19 5060 14284 0.13 9744 6 w3wp
155 11 1380 7276 0.05 5008 6 wininit
The above is the output of all processes running on my container host that match the SI 6. You can even see the w3wp process which is the IIS process running inside the container.
One note here is that this is only possible with Process isolation on Windows containers. Hyper-V containers won't have their processes shown on the host.
I am using phantomjs docker container, latest version of wernight/phantomjs. Here is link. https://hub.docker.com/r/wernight/phantomjs/
The problem is; When I start the container, after some time (2-3 days)
container is stopping suddenly with below error. Anyone has any idea or suggestion ? I use exist container as is.
ERROR - 2017-08-29T05:26:36.534Z] RouterReqHand - _handle.error -
{"stack":"evaluateJavaScript#[native code]\nevaluate#phantomjs://platform/webpage.js:390:39\n_getTextCommand#phantomjs://code/webelement_request_handler.js:341:90\n_handle#phantomjs://code/webelement_request_handler.js:102:28\n_reroute#phantomjs://code/session_request_handler.js:61:20\n_handle#phantomjs://code/session_request_handler.js:120:42\n_reroute#phantomjs://code/request_handler.js:61:20\n_handle#phantomjs://code/router_request_handler.js:78:46","line":390,"sourceURL":"phantomjs://platform/webpage.js"}
phantomjs://platform/console++.js:263 in error
1 0x1b67967 phantomjs() [0x1b67967]
2 0x1b800a9 phantomjs() [0x1b800a9]
3 0x92035b phantomjs() [0x92035b]
4 0x13b9e20 phantomjs() [0x13b9e20]
5 0x13b9f2a phantomjs() [0x13b9f2a]
6 0x13bb9c1 phantomjs() [0x13bb9c1]
7 0x13bcaa4 phantomjs() [0x13bcaa4]
8 0x13bcb6c phantomjs() [0x13bcb6c]
9 0x97bf27 phantomjs() [0x97bf27]
10 0x77e64b phantomjs() [0x77e64b]
11 0x478dc4 phantomjs() [0x478dc4]
12 0x47ad10 phantomjs() [0x47ad10]
13 0x42d613 phantomjs() [0x42d613]
14 0x425e34 phantomjs() [0x425e34]
15 0x41b90c phantomjs() [0x41b90c]
16 0x46ba0b phantomjs() [0x46ba0b]
17 0x46c503 phantomjs() [0x46c503]
18 0x7b6cad phantomjs() [0x7b6cad]
19 0x17fd966 phantomjs() [0x17fd966]
20 0x19db06e phantomjs() [0x19db06e]
21 0x19e7b07 phantomjs() [0x19e7b07]
22 0x19eed55 phantomjs() [0x19eed55]
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html and file a bug report.
Hard to say what is happening. You can run your container with --restart=unless-stopped. This will restart the container when it fails.
And since PhantomJS is no more maintained no one will answer your crash report on the forum. So best to just recover from the issue when it happens
i follow the tutorial from matt on:
http://jhipster.github.io/video-tutorial/
when i do cloc . i see i have much and much more files i would expect:
$ cloc .
66717 text files.
20401 unique files.
24466 files ignored.
http://cloc.sourceforge.net v 1.60 T=128.46 s (115.7 files/s, 15523.0 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Javascript 13322 222956 357190 1266221
HTML 676 6984 1047 44885
CSS 76 1883 932 22029
Java 262 3548 1854 15641
XML 53 3383 1395 11307
LESS 79 1388 1546 7269
C/C++ Header 18 1032 300 5109
YAML 190 221 346 3466
CoffeeScript 47 783 699 2467
make 58 417 523 1271
Bourne Shell 31 234 202 1097
Maven 1 12 34 824
Perl 2 87 170 584
DTD 1 179 177 514
SASS 5 42 25 273
C++ 4 43 26 260
IDL 6 38 0 167
Bourne Again Shell 3 28 36 140
D 6 0 0 118
Scala 1 16 7 118
JavaServer Faces 3 3 0 109
Smarty 6 17 30 91
DOS Batch 1 24 2 64
Python 1 7 7 36
XSLT 1 5 0 32
C# 2 3 1 27
ASP.Net 2 5 0 23
C 1 7 4 23
OCaml 1 5 15 6
Lisp 1 0 0 6
PowerShell 1 2 2 4
Lua 1 0 0 2
--------------------------------------------------------------------------------
SUM: 14862 243352 366570 1384183
--------------------------------------------------------------------------------
why is that?
in total it is 610 mb large!
it seems there are a lot of node modules:
$ du -h -d1
584M ./node_modules
24K ./gulp
26M ./src
64K ./.mvn
610M .
is this correct?
and what do i need to add to source control?
thanks
This is normal. Most of those files are NPM dependencies, as you mentioned.
The generated .gitignore should already be configured properly and will ignore node_modules.
I updated my ruby on Bluehost following the guide below.
http://www.haydonryan.com/installing-ruby-2-1-1p76-and-rails-4-0-4-on-bluehost/
http://www.haydonryan.com/rails-4-passenger-and-bluehost-with-a-cameo-from-wordpress/
Then I installed redmine using the guide from bluehost.
If I run rails s through ssh, I get
=> Booting WEBrick
=> Rails 4.2.4 application starting in development on localhost 3000
=> Run rails server -h for more startup options
=> Ctrl-C to shutdown server
[2015-10-13 06:45:51] INFO WEBrick 1.3.1
[2015-10-13 06:45:51] INFO ruby 2.2.3 (2015-08-18) [x86_64-linux]
[2015-10-13 06:45:51] INFO WEBrick::HTTPServer#start: pid=19685 port=3000
However, if I open the url from my browser, I get the error message below. What could be causing this?
Error message: Could not initialize MySQL client library Exception
class: RuntimeError Application root: /home/user/rails_apps/redmine
Backtrace:
# File Line Location
0 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
274 in require
1 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
274 in block in require
2 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
240 in load_dependency
3 /home/user/ruby/gems/gems/activesupport-4.2.4/lib/active_support/dependencies.rb
274 in require
4 /home/user/ruby/gems/gems/mysql2-0.3.20/lib/mysql2.rb 31 in
5 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 76 in require
6 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 76 in block (2 levels) in require
7 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 72 in each
8 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 72 in block in require
9 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 61 in each
10 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler/runtime.rb 61 in require
11 /home/user/ruby/gems/gems/bundler-1.10.6/lib/bundler.rb 134 in require
12 /home5/user/rails_apps/redmine/config/application.rb 5 in
13 /home5/user/rails_apps/redmine/config/environment.rb 2 in require
14 /home5/user/rails_apps/redmine/config/environment.rb 2 in
15 config.ru 3 in require
16 config.ru 3 in block in
17 /home/user/ruby/gems/gems/rack-1.6.4/lib/rack/builder.rb 55 in instance_eval
18 /home/user/ruby/gems/gems/rack-1.6.4/lib/rack/builder.rb 55 in initialize
19 config.ru 1 in new
20 config.ru 1 in
21 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
225 in eval
22 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
225 in load_rack_app
23 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
157 in block in initialize_server
24 /etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb 563 in report_app_init_status
25 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
154 in initialize_server
26 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
204 in start_synchronously
27 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
180 in start
28 /etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
129 in start
29 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
253 in block (2 levels) in spawn_rack_application
30 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
132 in lookup_or_add
31 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
246 in block in spawn_rack_application
32 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
82 in block in synchronize
33 prelude> 10:in synchronize
34 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
79 in synchronize
35 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
244 in spawn_rack_application
36 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
137 in spawn_application
37 /etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
275 in handle_spawn_application
38 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
357 in server_main_loop
39 /etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
206 in start_synchronously
40 /etc/httpd/modules/passenger/helper-scripts/passenger-spawn-server 99
in
Any help would be greatly appreciated. I'm trying to run basic Rails apps on my server.
I'm running Ubuntu and nginx. Ideally I'd like to be able to still run php apps so nginx+Phusion seems like the way to go.
A source file that the application requires, is missing.
It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded.
A required library may not installed. Please install all libraries that this application requires.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
no such file to load -- bundler
Exception class:
LoadError
0 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in gem_original_require'
1 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 inrequire'
2 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb 325 in prepare_app_process'
3 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb 156 ininitialize_server'
4 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb 563 in report_app_init_status'
5 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb 154 ininitialize_server'
6 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb 204 in start_synchronously'
7 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb 180 instart'
8 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/rack/application_spawner.rb 129 in start'
9 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 253 inspawn_rack_application'
10 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb 132 in lookup_or_add'
11 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 246 inspawn_rack_application'
12 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb 82 in synchronize'
13 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb 79 insynchronize'
14 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 244 in spawn_rack_application'
15 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 137 inspawn_application'
16 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb 275 in handle_spawn_application'
17 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb 357 insend'
18 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb 357 in server_main_loop'
19 /var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb 206 instart_synchronously'
20 /var/lib/gems/1.8/gems/passenger-3.0.19/helper-scripts/passenger-spawn-server 99
It seems like you installed passenger to your system ruby installation and not for the 1.9.3-p374 version via rvm. Try to follow the below steps:
rvm use 1.9.3-p374
gem install bundler passenger
passenger-install-apache2-module
Then use the instructions from the last command and configure your apache with them. Additionally, go to the project directory and do
rvm use 1.9.3-p374
bundle install
That should do the trick.