Berkshelf tossing "invalid ruby files" error on a cookbook?


#1

https://gist.github.com/stormerider/5663698

I’m a bit confused, since this is essentially a branch of the 4.1.2
community cookbook with my two pull requests merged into it. I’m defining
this in my Berksfile as:

cookbook ‘nagios’, git: ‘git@github.com:stormerider/nagios.git’, branch:
‘merge-4.1.2’

And I’ve never touched the file that it’s complaining about, as you can see:

And if I remove the git source in the Berksfile, it pulls down 4.1.2 just
fine from the community site and installs it fine.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS


#2

Morgan,

This looks like a Ruby 1.8.7 vs Ruby 1.9.3 syntax issue.

If you’re using Ruby 1.8.7 locally to manage your chef environment,
some things may not work as expected, for instance foodcritic requires
Ruby 1.9 and above.

Many people writing spec files are writing them in Ruby 1.9 syntax,
and these are being included in the git source, vs a packaged tarball
on the community site which may exclude them (due to a chefignore or
such).

In any case, I’d personally recommend that you use a newer Ruby on
your workstation (and your servers) than 1.8.7.

-M

On Tue, May 28, 2013 at 11:41 AM, Morgan Blackthorne
stormerider@gmail.com wrote:

https://gist.github.com/stormerider/5663698

I’m a bit confused, since this is essentially a branch of the 4.1.2
community cookbook with my two pull requests merged into it. I’m defining
this in my Berksfile as:

cookbook ‘nagios’, git: ‘git@github.com:stormerider/nagios.git’, branch:
‘merge-4.1.2’

And I’ve never touched the file that it’s complaining about, as you can see:

https://github.com/stormerider/nagios/tree/merge-4.1.2/spec

And if I remove the git source in the Berksfile, it pulls down 4.1.2 just
fine from the community site and installs it fine.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS


#3

I’ve converted the hash syntax to the “normal” style.

Sorry about that, I try to catch this because I personally don’t like that style. It breaks compatibility for no real reason. :slight_smile:

On May 28, 2013, at 9:46 AM, Mike miketheman@gmail.com wrote:

Morgan,

This looks like a Ruby 1.8.7 vs Ruby 1.9.3 syntax issue.

If you’re using Ruby 1.8.7 locally to manage your chef environment,
some things may not work as expected, for instance foodcritic requires
Ruby 1.9 and above.

Many people writing spec files are writing them in Ruby 1.9 syntax,
and these are being included in the git source, vs a packaged tarball
on the community site which may exclude them (due to a chefignore or
such).

In any case, I’d personally recommend that you use a newer Ruby on
your workstation (and your servers) than 1.8.7.

-M

On Tue, May 28, 2013 at 11:41 AM, Morgan Blackthorne
stormerider@gmail.com wrote:

https://gist.github.com/stormerider/5663698

I’m a bit confused, since this is essentially a branch of the 4.1.2
community cookbook with my two pull requests merged into it. I’m defining
this in my Berksfile as:

cookbook ‘nagios’, git: ‘git@github.com:stormerider/nagios.git’, branch:
‘merge-4.1.2’

And I’ve never touched the file that it’s complaining about, as you can see:

https://github.com/stormerider/nagios/tree/merge-4.1.2/spec

And if I remove the git source in the Berksfile, it pulls down 4.1.2 just
fine from the community site and installs it fine.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS


#4

FYI: https://github.com/michaeledgar/hash_syntax/
-M

On Tue, May 28, 2013 at 11:54 AM, Joshua Timberman joshua@opscode.com wrote:

I’ve converted the hash syntax to the “normal” style.

https://github.com/opscode-cookbooks/nagios/commit/ea7f1fe0f9d871fe227518a58ca282730ae400b1

Sorry about that, I try to catch this because I personally don’t like that style. It breaks compatibility for no real reason. :slight_smile:

On May 28, 2013, at 9:46 AM, Mike miketheman@gmail.com wrote:

Morgan,

This looks like a Ruby 1.8.7 vs Ruby 1.9.3 syntax issue.

If you’re using Ruby 1.8.7 locally to manage your chef environment,
some things may not work as expected, for instance foodcritic requires
Ruby 1.9 and above.

Many people writing spec files are writing them in Ruby 1.9 syntax,
and these are being included in the git source, vs a packaged tarball
on the community site which may exclude them (due to a chefignore or
such).

In any case, I’d personally recommend that you use a newer Ruby on
your workstation (and your servers) than 1.8.7.

-M

On Tue, May 28, 2013 at 11:41 AM, Morgan Blackthorne
stormerider@gmail.com wrote:

https://gist.github.com/stormerider/5663698

I’m a bit confused, since this is essentially a branch of the 4.1.2
community cookbook with my two pull requests merged into it. I’m defining
this in my Berksfile as:

cookbook ‘nagios’, git: ‘git@github.com:stormerider/nagios.git’, branch:
‘merge-4.1.2’

And I’ve never touched the file that it’s complaining about, as you can see:

https://github.com/stormerider/nagios/tree/merge-4.1.2/spec

And if I remove the git source in the Berksfile, it pulls down 4.1.2 just
fine from the community site and installs it fine.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS


#5

Nice!

I just found this recently:

For emacs :wink:

On May 28, 2013, at 10:06 AM, Mike miketheman@gmail.com wrote:

FYI: https://github.com/michaeledgar/hash_syntax/
-M

On Tue, May 28, 2013 at 11:54 AM, Joshua Timberman joshua@opscode.com wrote:

I’ve converted the hash syntax to the “normal” style.

https://github.com/opscode-cookbooks/nagios/commit/ea7f1fe0f9d871fe227518a58ca282730ae400b1

Sorry about that, I try to catch this because I personally don’t like that style. It breaks compatibility for no real reason. :slight_smile:


#6

Blargh, I was trying to point everything on my system to use
/opt/chef/embedded instead of the system ruby; I guess something snuck
through the cracks.

What is the preferred way to work with Chef under OSX? Is there an
RVM/rbenv/etc config that will use the omnibus install? I don’t do much
Ruby work on this system outside of Chef.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Tue, May 28, 2013 at 8:46 AM, Mike miketheman@gmail.com wrote:

Morgan,

This looks like a Ruby 1.8.7 vs Ruby 1.9.3 syntax issue.

If you’re using Ruby 1.8.7 locally to manage your chef environment,
some things may not work as expected, for instance foodcritic requires
Ruby 1.9 and above.

Many people writing spec files are writing them in Ruby 1.9 syntax,
and these are being included in the git source, vs a packaged tarball
on the community site which may exclude them (due to a chefignore or
such).

In any case, I’d personally recommend that you use a newer Ruby on
your workstation (and your servers) than 1.8.7.

-M

On Tue, May 28, 2013 at 11:41 AM, Morgan Blackthorne
stormerider@gmail.com wrote:

https://gist.github.com/stormerider/5663698

I’m a bit confused, since this is essentially a branch of the 4.1.2
community cookbook with my two pull requests merged into it. I’m defining
this in my Berksfile as:

cookbook ‘nagios’, git: ‘git@github.com:stormerider/nagios.git’, branch:
‘merge-4.1.2’

And I’ve never touched the file that it’s complaining about, as you can
see:

https://github.com/stormerider/nagios/tree/merge-4.1.2/spec

And if I remove the git source in the Berksfile, it pulls down 4.1.2 just
fine from the community site and installs it fine.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS