Juro que não esperava ter problemas em algo tão básico quanto a instalação e configuração do rails/ruby. Mas já desinstalei e instalei tudo 2x (windows 10) e continuo tendo problemas.
Quando tento rodar o 'rails server' depois de criar o arquivo, recebo a lista de comandos básicos e nada acontece:
C:\Users\Diogo\Desktop\Alura\Ruby\lojinha>rails server
Usage:
rails new APP_PATH [options]
Options:
[--skip-namespace], [--no-skip-namespace] # Skip namespace (affects
[...]
Example:
rails new ~/Code/Ruby/weblog
This generates a skeletal Rails installation in ~/Code/Ruby/weblog.
Pelo que pesquisei isso teria relação com a aplicação não ter sido criada corretamente. Então estou tentando rodar o 'bundle install' pra corrigir isso e recebo o seguinte erro:
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Using rake 13.0.1
Using concurrent-ruby 1.1.6
Using i18n 1.8.2
Using minitest 5.14.0
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 5.2.4.2
Using builder 3.2.4
Using erubi 1.9.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.9 (x64-mingw32)
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.5.0
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.4.2
Using rack 2.2.2
Using rack-test 1.1.0
Using actionpack 5.2.4.2
Using nio4r 2.5.2
Using websocket-extensions 0.1.4
Using websocket-driver 0.7.1
Using actioncable 5.2.4.2
Using globalid 0.4.2
Using activejob 5.2.4.2
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailer 5.2.4.2
Using activemodel 5.2.4.2
Using arel 9.0.0
Using activerecord 5.2.4.2
Using mimemagic 0.3.4
Using marcel 0.3.3
Using activestorage 5.2.4.2
Using public_suffix 4.0.4
Using addressable 2.7.0
Using io-like 0.3.1
Using archive-zip 0.12.0
Using bindex 0.8.1
Using msgpack 1.3.3 (x64-mingw32)
Fetching bootsnap 1.4.6
Installing bootsnap 1.4.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/ext/bootsnap
C:/Ruby25-x64/bin/ruby.exe -r ./siteconf20200416-7672-rjyqw0.rb extconf.rb
creating Makefile
current directory:
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/ext/bootsnap
make "DESTDIR=" clean
current directory:
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6/ext/bootsnap
make "DESTDIR="
generating bootsnap-x64-mingw32.def
compiling bootsnap.c
linking shared-object bootsnap/bootsnap.so
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
bootsnap.o:bootsnap.c:(.text+0x557): undefined reference to `__strcat_chk'
C:/Ruby25-x64/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/9.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
bootsnap.o:bootsnap.c:(.text+0xa07): undefined reference to `__chk_fail'
collect2.exe: error: ld returned 1 exit status
make: *** [Makefile:259: bootsnap.so] Erro 1
make failed, exit code 2
Gem files will remain installed in
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.6 for inspection.
Results logged to
C:/Ruby25-x64/lib/ruby/gems/2.5.0/extensions/x64-mingw32/2.5.0/bootsnap-1.4.6/gem_make.out
An error occurred while installing bootsnap (1.4.6), and Bundler cannot
continue.
Make sure that `gem install bootsnap -v '1.4.6' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
bootsnap