MongoDB depends on ruby? - ruby

I tried to startup mongod and I get this type of errors:
/Users/myuser/.rvm/bin/ruby: line 6: /Users/myuser/.rvm/bin/ruby: Argument list too long
/Users/myuser/.rvm/bin/ruby: line 6: /Users/myuser/.rvm/bin/ruby: Undefined error: 0
Why does mongoDB need ruby? and what does this mean exactly...

Can you clarify what you mean by "simply running mongod"? What command line options are you specifying? Where are you seeing these errors - on stdout? In a log? What else are you seeing before you get these errors? A little more context like this will help us better understand the problem you're experiencing.

Related

Can this Ruby error be caught with NeoVim/ALE/RuboCop/Syntastic?

I'm new to Ruby and doing some experimenting with NeoVim/ALE which I'm also new to. I'm coming from Perl using the syntastic plugin and I'm trying to figure out how to best set up NeoVim/ALE/RuboCop. I've never used a delinter before.
My confusion stems from this bit of code:
#!/usr/bin/env ruby
r = Array() # Improper array initialization, should be Array.new()
puts r
When run, I get:
Traceback (most recent call last):
1: from /Users/me/ruby/workshop/dink.rb:3:in `<main>'
/Users/me/ruby/workshop/dink.rb:3:in `Array': wrong number of arguments (given
0, expected 1) (ArgumentError)
RuboCop didn't catch this error. I turned syntastic on and it didn't catch the error either. I assume because it's a runtime error and not a compile time error like I thought it would be. Running ruby -c on the script yields no errors either. But perhaps I'm wrong and aren't using the syntax checking tools properly. Can someone please confirm that this is indeed a runtime error and that it's impossible to catch before executing the script?
I have a second question as well: Do I need syntastic with Ruby? Does it do anything more that RuboCop doesn't?
Thanks.
Both tools are correct, because there is the Array() method defined in Kernel.
That means this is not a syntax but a runtime error because that method expects at least one argument.
From the docs:
Array(arg) → array
Returns arg as an Array.
First tries to call to_ary on arg, then to_a. If arg does not respond to to_ary or to_a, returns an Array of length 1 containing arg.

Hive error when declaring hivevar

Trying to declare a variable in Hive using Hue online. Using the following code:
SET hivevar:TABLE1=location.tablename;
I am getting the following error message:
Error while compiling statement: FAILED: ParseException line 1:12 missing KW_ROLE at 'hivevar' near 'hivevar' line 1:19 missing EOF at ':' near 'hivevar'.
Can anyone tell me what this error message means or even what the KW_ROLE statement means?
Do you by any chance have a comment above that instruction ? Are you running that line and that line only ?
For example, the following will raise a similar Exception :
--This is a comment
SET hivevar:TABLE1=location.tablename;
But it works fine without the comment.
I guess you are making changes in MAC/Windows and moving the script to the server, Double dash "--" in MAC is a different from double dash "--" on Linux server, make changes on server itself and run the script...

error in sudo config, need help to fix

My shell give me this error when trying to do a sudo
/etc/sudoers: syntax error near line 30 <<
I did not modify this file...
anyway the 30th line is the very end of the file.
I paste here the last 3 rows, from 27 to 30
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
please help me to understand the problem and fix it.
I am a newbie on linux.
If the 30th line is the last one it might indicate that you have problems in the file somewhere along the way.
The parser has reached the end of the file and is telling you there is an error (might be looking for unclosed brackets of any kind etc).
If you can parse the full file or try to read it and go line by line to figure out where is the error.

error after installing magento

Parse error: syntax error, unexpected 'Sns_Avaz_Model_Observer'
(T_STRING) in
/home/ganyobiclothing/public_html/app/code/local/Sns/Avaz/Model/Observer.php
on line 1
If this is the sns-avaz-responsive-magento-theme you should check the following page: http://themeforest.net/item/sns-avaz-responsive-magento-theme/11951628/comments
Hi,
This issue only happen with some hosting/server – it compress content file
We’ve fixed this issue on v1.0.1. Please try go to file: >/app/code/local/Sns/Avaz/Model/Observer.php open it and add space after re-save.
Ex: "<?php" ==> "<?php "
P/S: See my screenshot: http://take.ms/v8G03 and If your issue still … please
Thanks!
Source: http://themeforest.net/item/sns-avaz-responsive-magento-theme/11951628/comments
Good luck!
Parse error: syntax error, unexpected 'Sns_Avaz_Model_Observer' (T_STRING) in /home/ganyobiclothing/public_html/app/code/local/Sns/Avaz/Model/Observer.php on line 1
As its saying on line 1 so probably there is some white space or special character thats resulting in this.

'no such file or directory' on a file that isn't accessed

I'm writing a small Ruby script that does a statistical analysis on a list of names generated by another script of mine.
When I run it with this command:
ruby [first script] [args] | ruby -- [second script] _
it throws this error:
./name_gen_test.rb:15:in `gets': No such file or directory # rb_sysopen - _ (Errno:ENOENT)
from .name_gen_test.rb:15:in `gets'
from .name_gen_test.rb:15:in `<main>'
(Apologies for typos; Powershell wouldn't let me copy/paste)
This is line 15:
until (cur_line = gets).nil?
Then there's the body of a loop, the rest of the code, etc. However, if I put this line:
gets
as the very first line, I get the same error. In fact, if I totally empty the file and have nothing but a call to gets, I get the error that the file '_' cannot be found.
How can I make it understand that '_' is a command line argument and not a file to be... read from, I guess? Why doesn't gets work like I expect it to (i.e. reading from the standard input)?
I'm running it with Powershell, if that makes a difference.
Sorry if this is a duplicate; simply Googling the error message leads to a dozen different issues and a dozen different solutions, none of which apply, and I couldn't figure out how to put this problem into a Google query.
STDIN.gets will do what you want. By default, gets is (pretty much) equivalent to ARGF.gets. ARGF reads from standard input if there are no ARGS, and from files that correspond to ARGS if there are.

Resources