Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems running setupmymac on my mac #223

Open
chrisdutz opened this issue Apr 21, 2024 · 4 comments
Open

Problems running setupmymac on my mac #223

chrisdutz opened this issue Apr 21, 2024 · 4 comments

Comments

@chrisdutz
Copy link

So I just ran setupmymac on my mac and I got errors.

$ sudo ln -s /var/log/apache2 /srv/whimsy/www/members/log
/Users/cdutz/Projects/Apache/Whimsy/whimsy/config/setupmymac:374:in `read': No such file or directory @ rb_sysopen - /etc/apache2/other/passenger.conf (Errno::ENOENT)
        from /Users/cdutz/Projects/Apache/Whimsy/whimsy/config/setupmymac:374:in `<main>'

When debugging the script it seems that in my case passenger_conf doesn't exist at /etc/apache2/other/passenger.conf and therefore the script goes into the second part of the expression in:

unless File.exist?(passenger_conf) or File.read(passenger_conf) != snippet

Which then fails ... could it be that this should be an and instead of an or?

@chrisdutz
Copy link
Author

I'll submit a pr and also I manaually needed to run:

brew install libyaml

Or I'd get the following error when installing psych.

https://stackoverflow.com/questions/74715148/error-error-installing-psych-error-failed-to-build-gem-native-extension

@chrisdutz
Copy link
Author

This makes it possible to continue for quite a while, till the build then fails with:

$ rake git:pull
mkdir -p /srv/git
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/extension.rb:30:in `rescue in <top (required)>'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/extension.rb:4:in `<top (required)>'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri.rb:10:in `require_relative'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri.rb:10:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        from /private/var/whimsy/whimsy/lib/whimsy/asf/podling.rb:1:in `<top (required)>'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `require_relative'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Users/cdutz/Projects/Apache/Whimsy/whimsy/config/setupmymac:434:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/extension.rb:30:in `rescue in <top (required)>'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/extension.rb:4:in `<top (required)>'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri.rb:10:in `require_relative'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri.rb:10:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        from /private/var/whimsy/whimsy/lib/whimsy/asf/podling.rb:1:in `<top (required)>'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `require_relative'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Users/cdutz/Projects/Apache/Whimsy/whimsy/config/setupmymac:434:in `<main>'
/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/extension.rb:7:in `require_relative': dlopen(/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle' (no such file), '/Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) - /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/2.6/nokogiri.bundle (LoadError)
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri/extension.rb:7:in `<top (required)>'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri.rb:10:in `require_relative'
        from /Library/Ruby/Gems/2.6.0/gems/nokogiri-1.13.10-x86_64-darwin/lib/nokogiri.rb:10:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:130:in `rescue in require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:34:in `require'
        from /private/var/whimsy/whimsy/lib/whimsy/asf/podling.rb:1:in `<top (required)>'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `require_relative'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Users/cdutz/Projects/Apache/Whimsy/whimsy/config/setupmymac:434:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- nokogiri (LoadError)
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /private/var/whimsy/whimsy/lib/whimsy/asf/podling.rb:1:in `<top (required)>'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `require_relative'
        from /private/var/whimsy/whimsy/lib/whimsy/asf.rb:14:in `<top (required)>'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Users/cdutz/Projects/Apache/Whimsy/whimsy/config/setupmymac:434:in `<main>'

@sebbASF
Copy link
Contributor

sebbASF commented Apr 21, 2024

Oops, you're correct; setupmymac now fixed.

Note that you may find it easier to use Docker for testing, though if you have an Apple CPU (M1 etc) puppeteer does not work. Otherwise I find it works well, and anyway puppeteer is only needed for website checks.

@chrisdutz
Copy link
Author

digging a bit deeper it seems to be related to my M2 mac ... from what I see it tries to instal the x86 version of nokogiri, but my system is:

cdutz@MacBook-Pro-von-Christofer config % bundle platform
Your platform is: universal.arm64e-darwin23

Your app has gems that work on these platforms:
* ruby

Your Gemfile does not specify a Ruby version requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants