<p>Do you have wallet enabled? <code>generate</code> is a wallet RPC now since it needs to get an address from the wallet. If wallets are disabled, then <code>generate</code> will not work. If you want to mine without wallets being enabled, use <code>generatetoaddress</code>.</p>

CC BY-SA 3.0
2017-08-16T19:44:11.060Z
Thanks, I built bitcoin from source and I had misunderstood the consequences of `--disable-wallet`
Ivano Donadi
CC BY-SA 3.0
2017-08-16T17:18:20.350Z
2017-08-16T17:18:20.350Z
Ava Chow
<p>I have alredy looked at a lot of other similar questions here but they didn't involve my case or the solutions provided did not work for me. I'm trying to work in regtest mode and I'm using bitcoin core v0.15.0 on a Debian machine. My bitcoin.conf file looks like this:</p>

<pre><code>$HOME/.bitcoin/bitcoin.conf -&gt;
rpcuser=bitcoinrpc
rpcpassword=7bljxv........zabyi
</code></pre>

<p>I run the command</p>

<pre><code>bitcoind -regtest -daemon
</code></pre>

<p>And then</p>

<pre><code>bitcoin-cli -regtest getblockchaininfo
</code></pre>

<p>And it works fine, but if I try to run the following command:</p>

<pre><code>bitcoin-cli -regtest generate 101
</code></pre>

<p>I get the following error:</p>

<pre><code>error code: -32601
error message:
Method not found
</code></pre>

<bitcoind><regtest><bitcoin-cli>
regtest method not found
Ivano Donadi
# regtest method not found

(Asked by: username_0 on 2017-08-16)

I have alredy looked at a lot of other similar questions here but they didn't involve my case or the solutions provided did not work for me. I'm trying to work in regtest mode and I'm using bitcoin core v0.15.0 on a Debian machine. My bitcoin.conf file looks like this:

```
$HOME/.bitcoin/bitcoin.conf ->
rpcuser=bitcoinrpc
rpcpassword=7bljxv........zabyi

```

I run the command

```
bitcoind -regtest -daemon

```

And then

```
bitcoin-cli -regtest getblockchaininfo

```

And it works fine, but if I try to run the following command:

```
bitcoin-cli -regtest generate 101

```

I get the following error:

```
error code: -32601
error message:
Method not found

```

**Tags:** bitcoind, regtest, bitcoin-cli


---

## 1 answers

### Answer by username_1 on 2017-08-16. Score: 1 | Accepted answer

Do you have wallet enabled? `generate` is a wallet RPC now since it needs to get an address from the wallet. If wallets are disabled, then `generate` will not work. If you want to mine without wallets being enabled, use `generatetoaddress`.

> **Comments:**
> **username_0**: Thanks, I built bitcoin from source and I had misunderstood the consequences of `--disable-wallet`  

---

