Installation - Emacs and Redis

I’m not sure why the setup script is wanting to install emacs; doing so on the latest Ubuntu at least ends up pulling in all of X11 and tons of stuff I don’t actually want. Is emacs used by ares somehow? Or is it just an editor for the admin? (I’m a vim person)

<INSTALL> Give ares user access to www and redis directory
chgrp: cannot access '/var/lib/redis/dump.rdb': No such file or directory
chmod: cannot access '/var/lib/redis/dump.rdb': No such file or directory

I didn’t see any errors in redis’ installation, is it possible redis needs to be started? I don’t know what that file is for or anything really about redis.

Hrm, I see it does have a ‘service redis start’ in the script. Hrm.

I can remove emacs - it was just a convenience for myself. Didn’t realize it pulled in a ton of junk.

As for redis… hmm… I haven’t run into that problem and I’ve run those installers a dozen times. I wonder if something changed with a recent redis or Ubuntu patch. What versions of Ubuntu and redis do you have?

The dump file is essentially the database output file. I thought it was created when the database started, which should have happened during the earlier step:

echo -e “${ARES_INSTALL_TEXT} Start the database server.”
service redis start

Were there any errors in that step? If you do service redis-server status does it tell you the db server is running?

I wiped that linode to clear out all the stuff from emacs, and reinstalled.

This is Ubuntu 17.10, and it looks like redis 4.0.8.

The output for that command is:

root@hobby-2:/etc# service redis-server status

  • redis-server.service - Advanced key-value store
    Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
    Active: active (running) since Sat 2018-03-17 02:40:53 UTC; 2min 29s ago
    Docs: https://redis.io/docs/,
    man:redis-server(1)
    Main PID: 17523 (redis-server)
    Tasks: 4 (limit: 4915)
    Memory: 1.4M
    CPU: 176ms
    CGroup: /system.slice/redis-server.service
    `-17523 /usr/bin/redis-server 127.0.0.1:6379

Mar 17 02:40:53 hobby-2 systemd[1]: Starting Advanced key-value store…
Mar 17 02:40:53 hobby-2 run-parts[17514]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example
Mar 17 02:40:53 hobby-2 run-parts[17524]: run-parts: executing /etc/redis/redis-server.post-up.d/00_example
Mar 17 02:40:53 hobby-2 systemd[1]: Started Advanced key-value store.

1 Like

For shits and giggles, I stopped redis and the dump file showed up. So it looks like it doesn’t make the file on creation.

Okay so your db server’s running. Maybe the install location changed. If you look in /etc/redis/redis.conf there should be lines like:

dbfilename “dump.rdb”

dir “/var/lib/redis”

Are they different?

Nope! They’re the same. But the file was created when I shut redis down, so apparently (anymore?) it doesn’t make the file on first startup.

Interesting. May also have been a race condition … time between installing redis and it doing its first periodic db dump. Either way, I’ll look into that more and make the necessary adjustments to the install scripts. Thanks for the report.

Those steps are mostly needed for doing backups/restores later … it won’t really affect the game installation if they fail. You can just run them manually at some point after the dump file exists.

Yeah, I did 'em manually. Thanks!

Ouch. I got a new error, and being a Ruby newb, I not only don’t know what it means, but am not sure how to pick up installation where it left off if I fix it.

It looks like its unable to compile the json gem, which strikes me as mildly astonishing on an up to date linux:

Setup the game.
Fetching gem metadata from http://rubygems.org/
Fetching rake 10.4.2
Installing rake 10.4.2
Fetching i18n 0.6.11
Installing i18n 0.6.11
Fetching json 1.8.3
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator

/home/ares/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180317-12836-7mowmm.rb extconf.rb
creating Makefile

current directory: /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
make “DESTDIR=” clean

current directory: /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
make “DESTDIR=”
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function); did you mean ‘mFixnum’?
} else if (klass == rb_cFixnum) {
^~~~~~~~~~
mFixnum
generator.c:861:25: note: each undeclared identifier is reported only once for each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function); did you mean ‘rb_cFixnum’?
} else if (klass == rb_cBignum) {
^~~~~~~~~~
rb_cFixnum
generator.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:241: recipe for target ‘generator.o’ failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3 for inspection.
Results logged to /home/ares/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v '1.8.3' succeeds before bundling.

In Gemfile:
activesupport was resolved to 4.1.16, which depends on
json
Could not find json-1.8.3 in any of the sources
Run bundle install to install missing gems.
Could not find json-1.8.3 in any of the sources
Run bundle install to install missing gems.
Setup the web portal.
Node for Ember
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12540 100 12540 0 0 12540 0 0:00:01 --:–:-- 0:00:01 87083
=> Downloading nvm from git to ‘/home/ares/.nvm’
=> Cloning into ‘/home/ares/.nvm’…
remote: Counting objects: 264, done.
remote: Compressing objects: 100% (229/229), done.
remote: Total 264 (delta 31), reused 106 (delta 25), pack-reused 0
Receiving objects: 100% (264/264), 116.46 KiB | 8.32 MiB/s, done.
Resolving deltas: 100% (31/31), done.
Note: checking out ‘7ad6d98cedde01809e32d56ab8ced064f6f28175’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

git checkout -b

=> Compressing and cleaning up git repository

=> Appending nvm source string to /home/ares/.bashrc
=> Appending bash_completion source string to /home/ares/.bashrc
=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR=“$HOME/.nvm”
[ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh” # This loads nvm
[ -s “$NVM_DIR/bash_completion” ] && . “$NVM_DIR/bash_completion” # This loads nvm bash_completion
Downloading and installing node v9.8.0…
Downloading https://nodejs.org/dist/v9.8.0/node-v9.8.0-linux-x64.tar.xz
######################################################################## 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v9.8.0 (npm v5.6.0)
Creating default alias: default → node (-> v9.8.0)
Ember CLI
/home/ares/.nvm/versions/node/v9.8.0/bin/ember → /home/ares/.nvm/versions/node/v9.8.0/lib/node_modules/ember-cli/bin/ember

spawn-sync@1.0.15 postinstall /home/ares/.nvm/versions/node/v9.8.0/lib/node_modules/ember-cli/node_modules/spawn-sync
node postinstall

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/ember-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

  • ember-cli@3.0.1
    added 740 packages in 22.843s
    Bower for web dependencies
    npm WARN deprecated bower@1.8.2: …psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: How to migrate away from Bower? · Bower blog
    /home/ares/.nvm/versions/node/v9.8.0/bin/bower → /home/ares/.nvm/versions/node/v9.8.0/lib/node_modules/bower/bin/bower

  • bower@1.8.2
    added 1 package in 2.774s
    Creating game dir link.
    Starting game
    Fetching gem metadata from http://rubygems.org/
    Using rake 10.4.2
    Using i18n 0.6.11
    Fetching json 1.8.3
    Installing json 1.8.3 with native extensions
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
    /home/ares/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180317-13991-12597pv.rb extconf.rb
    creating Makefile

current directory: /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
make “DESTDIR=” clean

current directory: /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
make “DESTDIR=”
compiling generator.c
generator.c: In function ‘generate_json’:
generator.c:861:25: error: ‘rb_cFixnum’ undeclared (first use in this function); did you mean ‘mFixnum’?
} else if (klass == rb_cFixnum) {
^~~~~~~~~~
mFixnum
generator.c:861:25: note: each undeclared identifier is reported only once for each function it appears in
generator.c:863:25: error: ‘rb_cBignum’ undeclared (first use in this function); did you mean ‘rb_cFixnum’?
} else if (klass == rb_cBignum) {
^~~~~~~~~~
rb_cFixnum
generator.c: At top level:
cc1: warning: unrecognized command line option ‘-Wno-self-assign’
cc1: warning: unrecognized command line option ‘-Wno-constant-logical-operand’
cc1: warning: unrecognized command line option ‘-Wno-parentheses-equality’
Makefile:241: recipe for target ‘generator.o’ failed
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/ares/.rvm/gems/ruby-2.4.1/gems/json-1.8.3 for inspection.
Results logged to /home/ares/.rvm/gems/ruby-2.4.1/extensions/x86_64-linux/2.4.0/json-1.8.3/gem_make.out

An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v '1.8.3' succeeds before bundling.

In Gemfile:
activesupport was resolved to 4.1.16, which depends on
json
Done!

Doh! Ares is just not playing nice for you tonight is it? :frowning:

Are you working off the latest master Ares code? Because the version numbers don’t seem right. Latest master is using rake 12.3, i18n 0.7 and json 2.1. I think maybe you played around with Ares before, so just wondering if maybe you were trying to use it with an out of date fork?

ETA: I ask because there’s a known issue with Json 1.8.3 and Ruby 2.4 which is why the latest Ares code upgraded to a newer version of the Json gem.

Heeeeeey… you know what, I did just click ‘fork’ today, but you’re probably right. I already had one, so duhh. Okay, sorry. :smiley: I’ll rebuild the machine and start again.

No worries! But yeah, AFAIK you can only ever have one fork of a given repository, so it’s probably still just using your old one. If you want to start your fork fresh, this topic may help.

Oh yeah, I know all about git/github. I just didn’t think when I hit the ‘Fork’ button that it didn’t do the whole ‘forking…’ and took me to my existing fork :slight_smile: Had a brainfart.

1 Like