You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

重建DSpace更新站点语言时遭遇Maven构建失败求助

Hey there, let's work through this DSpace Mirage2 build failure together. You're hitting two linked issues: an unavailable rubygems proxy service and an outdated Ruby version that doesn't meet the rb-inotify gem's requirements. Here's how to resolve both:

Step 1: Upgrade Your Ruby Version

Ubuntu 16.04 ships with a Ruby version older than 2.2, which is required for rb-inotify-0.10.0.gem. We'll use rbenv (a lightweight Ruby version manager) to install a compatible version:

  • First, install dependencies for building Ruby:
    sudo apt-get install git curl libssl-dev libreadline-dev zlib1g-dev
    
  • Clone rbenv to your user directory:
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    
  • Add rbenv to your shell's PATH (for Bash):
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    
    If you use Zsh, replace .bashrc with .zshrc in the commands above.
  • Reload your shell to apply the changes:
    source ~/.bashrc
    
  • Install the ruby-build plugin to simplify Ruby version installation:
    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
    
  • Install a Ruby version ≥2.2 (we'll use 2.7.8, a stable, widely compatible release):
    rbenv install 2.7.8
    
  • Set this as your global default Ruby version:
    rbenv global 2.7.8
    
  • Verify the upgrade worked:
    ruby -v
    
    You should see output like ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux].

Alternative for apt users: If you prefer system packages, use the Brightbox Ruby PPA:

sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.7 ruby2.7-dev

Step 2: Fix the Rubygems Proxy 503 Error

The rubygems-proxy.torquebox.org service is unreliable (returning 503 errors). Let's switch to the official rubygems source:

  • Remove the problematic proxy source:
    gem sources --remove https://rubygems-proxy.torquebox.org/
    
  • Add the official rubygems source:
    gem sources --add https://rubygems.org/
    
  • Confirm only the official source is listed:
    gem sources -l
    
  • Install or update Bundler (used by Mirage2 to manage gems):
    gem install bundler
    

Step 3: Re-Run the DSpace Build

Clear cached artifacts to avoid leftover issues before rebuilding:

  • Navigate to your DSpace source directory.
  • Clean Maven's build cache:
    mvn clean
    
  • Navigate to the Mirage2 theme directory and clean Ruby gem caches:
    cd xmlui/src/main/webapp/themes/Mirage2
    bundle clean --force
    bundle install
    
  • Return to the root DSpace directory and run your original build command:
    cd ../../../../../
    mvn -U clean package -Dmirage2.on=true
    

This should resolve both the Ruby version mismatch and the rubygems proxy error, letting the Mirage2 theme build successfully.

内容的提问来源于stack exchange,提问作者Wesin Alves

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 09:17:10