# redmine4 rebuild cannot find rake



## byrnejb (Feb 24, 2021)

Because the package Redmine-4 Ruby on Rails application is not configured to use PostgreSQL I had to rebuild the package locally using Poudriere and custom options.  While the build completed without error the application does not run because of this error:


```
Could not spawn process for application /usr/local/www/redmine:
The application encountered the following error:
Missing `secret_key_base` for 'production' environment,
set this string with `rails credentials:edit` (ArgumentError)
```

However, when I enter the /usr/local/www/redmine/ directory and run `rails credentials:edit` then I get this error:

```
Could not find rake-13.0.3 in any of the sources
Run `bundle install` to install missing gems.
```

However, the rake package is installed:

```
pkg info "$(pkg info -x rake | head -n 1)"
rubygem-rake-13.0.3
Name           : rubygem-rake
Version        : 13.0.3
Installed on   : Tue Feb 23 14:58:13 2021 EST
Origin         : devel/rubygem-rake
Architecture   : FreeBSD:12:*
Prefix         : /usr/local
Categories     : devel rubygems
Licenses       : MIT
Maintainer     : ruby@FreeBSD.org
WWW            : https://github.com/ruby/rake
Comment        : Ruby Make
Annotations    :
    cpe            : cpe:2.3:a:ruby-lang:rake:13.0.3:::::freebsd12:x64
    repo_type      : binary
    repository     : Poudriere-12-2-http
Flat size      : 270KiB
```

I have tried

```
bundle add rake --skip-install
bundle lock
```

This does not remove the missing gem error.

How is this fixed?  Rake is used by al number of production tasks so its absence is critical.

WWW: https://github.com/ruby/rake


----------



## SirDice (Feb 24, 2021)

Don't post the same question twice. Threads merged. Double post deleted.


----------



## byrnejb (Feb 24, 2021)

I fixed this problem by:


```
pkg install rubygem-mini_portile2
cd /usr/local/www/redmine
bundle config set system 'true'
bundle add mini_portile2
bundle update nokogiri
bundle install --full-index
```


----------

