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

rake svn:update git:pull fails #162

Closed
grobmeier opened this issue May 18, 2022 · 5 comments · Fixed by #163
Closed

rake svn:update git:pull fails #162

grobmeier opened this issue May 18, 2022 · 5 comments · Fixed by #163

Comments

@grobmeier
Copy link
Member

After a succesful rake docker:update, I wanted to run:

rake svn:update git:pull

The result is:

** Invoke svn:update (first_time)
** Invoke config (first_time)
** Execute config
rake aborted!
LoadError: cannot load such file -- whimsy/asf/config
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Users/cy/Development/apache-whimsy/whimsy/Rakefile:112:in `block in <top (required)>'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:238:in `block in invoke_prerequisites'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:236:in `each'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:236:in `invoke_prerequisites'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:213:in `block in invoke_with_call_chain'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
/Users/cy/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
/Users/cy/.rvm/rubies/ruby-2.6.3/bin/rake:23:in `load'
/Users/cy/.rvm/rubies/ruby-2.6.3/bin/rake:23:in `<main>'
Tasks: TOP => svn:update => config

Looks I missed to configure something but could not find what it is from here:
https://github.com/apache/whimsy/blob/master/DOCKER.md

@sebbASF
Copy link
Contributor

sebbASF commented May 18, 2022

Did you issue the following command?

echo ":root: ." >.whimsy

The '.whimsy' file should be in the parent directory, i.e. one level above where DOCKER.md is located.

@grobmeier
Copy link
Member Author

grobmeier commented May 19, 2022

Yes, I did it according to the docs. My folder structure looks like:

-rw-r--r--   1 cy  staff     9B May 17 20:48 .whimsy
drwxr-xr-x   2 cy  staff    64B May 16 18:38 cache
drwxr-xr-x   9 cy  staff   288B May 18 19:04 gems
drwxr-xr-x   3 cy  staff    96B May 16 18:38 mail
drwxr-xr-x  11 cy  staff   352B May 16 18:38 subscriptions
drwxr-xr-x  37 cy  staff   1.2K May 18 18:43 whimsy

The content of .whimsy is:

:root: .

@sebbASF
Copy link
Contributor

sebbASF commented May 22, 2022

The problem is that the Rakefile is expecting to find the config under /srv/whimsy/lib; however /srv/whimsy is only set up under docker.

Can you please try editing Rakefile as follows?
Thanks!

--- a/Rakefile
+++ b/Rakefile
@@ -108,7 +108,7 @@ end
 
 # This requires Gems such as Wunderbar to have been set up
 task :config do
-  $LOAD_PATH.unshift '/srv/whimsy/lib'
+  $LOAD_PATH.unshift 'lib'

@sebbASF
Copy link
Contributor

sebbASF commented May 22, 2022

The Rakefile assumes that it will be run from the directory in which it appears. Indeed it looks for the library sources (which include config) here:

lib_update = Dir['lib/**/*'].map {|n| File.mtime n rescue Time.at(0)}.max

So it should be OK to make that change for all circumstances.
But it would be good to get confirmation that it fixes the issue for you!

grobmeier added a commit to grobmeier/whimsy that referenced this issue May 23, 2022
@grobmeier
Copy link
Member Author

@sebbASF - it indeed fixes the issue for me. I could successfully run the command. For your convenience I just created a PR with your proposed change. Thanks a lot for your help!

sebbASF pushed a commit that referenced this issue May 23, 2022
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