4 ms·
Is the db mandatory in Rails or could the db specific lines be removed from the code if no db is needed?
by mg 2y ago
Is the db mandatory in Rails or could the db specific lines be removed from the code if no db is needed?
- cassiogo 2y agoNot mandatory, you could remove that
- mg 2y agoCool. What would be the steps from a fresh Debian to get it running and see it in action?
- cassiogo 2y agoNot sure debian has (a modern) ruby installed by default, but I think you only need to have a working ruby installation and running the script. On a sidenote, this came out recently and could interest you https://dashbit.co/blog/announcing-phoenix-playground https://dashbit.co/blog/announcing-phoenix-playground
- mg 2y agoI tried it like this: 1: apt install ruby 2: Put your code in test.rb 3: ruby test.rb I then I got: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. \e[0m current directory: /var/lib/gems/3.1.0/gems/stringio-3.1.1/ext/stringio /usr/bin/ruby3.1 -I /usr/lib/ruby/vendor_ruby -r ./siteconf20240626-4044-iylnuy.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h You might have to install separate package for the ruby development environment, ruby-dev or ruby-devel for example. So I tried: 4: apt install ruby-dev 5: ruby test.rb Then I got: [4147, #<Thread:0x00007f9a4af6bc60 run>, #<NameError: uninitialized constant Gem::Source (defined?(@source) && @source) || Gem::Source::Installed.new ^^^^^^^^