mpalmer / lvmsync

Synchronise LVM LVs across a network by sending only snapshotted changes
http://theshed.hezmatt.org/lvmsync
GNU General Public License v3.0
380 stars 60 forks source link

lvmsync-3.1.1/bin/lvmsync:121: syntax error, unexpected ')', expecting '=' (SyntaxError) #36

Closed WMP closed 9 years ago

WMP commented 9 years ago

on ubuntu 12.04:

root@gaja ~/lvmsync # ./lvmsync_diff.sh 
  Logical volume "test-snapshot" created
creating file normal_test.20141011-1043
creating file snapshot_test.20141011-1043
lvmsync...
/usr/local/bin/lvmsync:19:in `load': /var/lib/gems/1.8/gems/lvmsync-3.1.1/bin/lvmsync:121: syntax error, unexpected ')', expecting '=' (SyntaxError)
/var/lib/gems/1.8/gems/lvmsync-3.1.1/bin/lvmsync:159: syntax error, unexpected kEND, expecting $end
        from /usr/local/bin/lvmsync:19
lvmsync done
cleanup
  Logical volume "test-snapshot" successfully removed
root@gaja ~/lvmsync # lvmsync --version
/usr/local/bin/lvmsync:19:in `load': /var/lib/gems/1.8/gems/lvmsync-3.1.1/bin/lvmsync:121: syntax error, unexpected ')', expecting '=' (SyntaxError)
/var/lib/gems/1.8/gems/lvmsync-3.1.1/bin/lvmsync:159: syntax error, unexpected kEND, expecting $end
        from /usr/local/bin/lvmsync:19
root@gaja ~/lvmsync #

On 14.04:

root@backup ~ # lvmsync --version
/usr/local/rvm/gems/ruby-1.8.7-head/bin/lvmsync:23:in `load': /usr/local/rvm/gems/ruby-1.8.7-head/gems/lvmsync-3.1.1/bin/lvmsync:121: syntax error, unexpected ')', expecting '=' (SyntaxError)
/usr/local/rvm/gems/ruby-1.8.7-head/gems/lvmsync-3.1.1/bin/lvmsync:159: syntax error, unexpected kEND, expecting $end
        from /usr/local/rvm/gems/ruby-1.8.7-head/bin/lvmsync:23
        from /usr/local/rvm/gems/ruby-1.8.7-head/bin/ruby_executable_hooks:15
root@backup ~ #
WMP commented 9 years ago

On ruby-2.1.1 works.

mpalmer commented 9 years ago

Yeah, this is a Ruby 1.8ism. I'll get a fixed up release out shortly.

mpalmer commented 9 years ago

The newly release lvmsync 3.1.2 should work fine on 1.8 (tested under 1.8.7). You'll want the latest version of git-version-bump (0.13.2), because that had a 1.9ism I needed to fix, too.