Failing to setup my database

0

I have Ruby on Rails running on Raspberry Pi 3/Raspbian (probably not a good idea), although I rarely encounter any issues. However, when I switched from SQLite to PostgreSQL for my database I get this strange error message that I cannot wrap my head around. I created a new Rails application using rails new myapp --database=postgresql which generated my application. I then went on to issue rails db:setup which is where I ran into the issue. I captured the error message into a text file using rails db:setup &> error_message.txt, which created a lengthy file. The first two lines are probably the most interesting:

/usr/local/lib/ruby/gems/2.5.0/gems/bootsnap-1.3.0/lib/bootsnap/compile_cache/iseq.rb:18: [BUG] Bus Error at 0x00aaa33b
ruby 2.5.1p57 (2018-03-29 revision 63029) [armv7l-linux-eabihf]

My question is essentially: is Ruby on Rails incompatible with ARM architectures?

Update 1: I was able to get around this error by commenting out require 'bootsnap/setup' under config/boot.rb, but then I encounter this error instead:

** Invoke db:setup (first_time)
** Invoke db:schema:load_if_ruby (first_time)
** Invoke db:create (first_time)
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
/usr/local/lib/ruby/gems/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/notifier.rb:54: [BUG] Segmentation fault at 0x00000023
ruby 2.5.1p57 (2018-03-29 revision 63029) [armv7l-linux-eabihf]

Update 2: I decided to setup my development environment on Debian 9 (executing on an x86 architecture), instead of my Raspbian (ARM architecture). I can now confirm that Ruby on Rails executes the aforementioned commands without generating any errors.

ruby-on-rails
asked on Stack Overflow Apr 18, 2018 by (unknown user) • edited Apr 21, 2018 by (unknown user)

2 Answers

1

Helo Mihkel,

I have RPi 2 and I didn't use as development machine because these type of boards work for IoT. I don't know what is your OS, but I highly recommended to change your development environment to Docker or Vagrant.

Anyway, let's look to this error

When I Google it, I found these solutions

So, it seems SD problem or update. (If you solved, let me know)

Thank you.

answered on Stack Overflow Apr 18, 2018 by Berkhan Berkdemir
1

I found a solution for that last error - You have to disable Spring

To do this go to your home/username folder, and type ls -a

There you see a file called .bashrc

Open this file:

$nano .bashrc

at the bottom you can add the following line:

export DISABLE_SPRING=true 

save and exit file,

Then type in command line to activate it:

$source ~/.bashrc
answered on Stack Overflow Apr 19, 2018 by Com • edited Apr 21, 2018 by Samuel Liew

User contributions licensed under CC BY-SA 3.0