How to "install" sqlite3 on my Windows 10 computer? - windows

So I wanted to get started on Ruby on Rails because it sounds like fun but as I reached part 3.1 over here I ran into some problems.
First I just attempted "sqlite3 --version" in the "ruby cmd" and it came up with: "'sqlite3' is not recognized as an internal or external command, operable program or batch file." So I attempted to just install the sqlite ruby gem and it did that just fine but as I typed "sqlite3 --version", same story. So I just figured you needed to install the thing your self.
So after I downloaded the "Precompiled Binaries for Windows" (64-bit DLL (x64) for SQLite version 3.11.1.) over here I moved the .dll and .def files to my system32 folder, launched CMD as admin and typed regsvr32 sqlite3.dll I get this error message: "The module "C:\WINDOWS\System32\sqlite3.dll" was loaded but the entry-point DIIRegisterServer was not found. Make sure that "C:\WINDOWS\System32\sqlite3.dll" is a valid DLL or OCX file and then try again.
I did a lot of googleing and talked with microsoft support and nothing helped. So im hopeing someone can help me out here. Thanks in advance :)
PS: My PC is "Windows 10 pro" 64 bit. If it matters.

SQLite is an embedded database; it does not run as a separate server process, but is a library that is usually compiled directly into the application itself.
Running the sqlite3 command-line shell does not make sense, because the version of the SQLite library compiled into that is not necessarily related to the version compiled into the Ruby gem. The guide you linked to is wrong; just ignore that point.
(But if you want to test SQL queries outside of Ruby, there's nothing wrong with installing and running sqlite3.exe.)
You do not need to install the DLL manually; any program that needed it would already ship with it.
For how to test the SQLite Ruby gem, see the sqlite3-ruby documentation.

Guide of what a path is and how to add stuff to it it. You may also want to consider using PostgreSQL as many members of the community prefer it over the packaged sqlite3.
These guys are also right about Ruby development kind of sucking on non-Unix systems though so if you plan on getting into this you might want to consider dual booting a Linux OS for development. You'll probably save yourself a lot of bugs.

Related

installation pip install dbt-postgres

I guess just installed dbt-postgres according to the article https://docs.getdbt.com/dbt-cli/install/pip
using command pip install dbt-postgres
after the installation I have everywhere Requirements already satisfied
When I try the command to see the version I have an error
''dbt' is not recognized as an internal or external command,
operable program or batch file.'
Does this mean that I didn't downloaded this?
How to check the version?
pip is saying that you already have dbt-postgres installed ("Requirement already satisfied") in your local Python 3.10 environment.
Windows is complaining because that Python's site-packages directory is not on your PATH. This is typical; depending on how you install Python on Windows, it is not automatically added to your PATH. (PATH is an environment variable that tells your shell where to search for the commands you type in -- each command is the name of an executable file in a folder somewhere, and PATH is a list of folders to search in for those executable files).
There are a few ways to add Python to your PATH -- see the official docs on this subject. If you're new to all of this, your best bet might be to uninstall and re-install Python. The Windows Store is now the best way to do this.
HOWEVER there is another issue here too -- you're trying to run dbt on Python 3.10, but currently dbt only supports older versions of Python (3.7-3.9). So when you re-install Python, you're going to want to specify 3.9 (which I linked to above).
Managing multiple versions of Python on your machine can be a real pain, especially on Windows. If you have someone more experienced in your organization (like an engineer who knows Python well), it's well worth your time to get someone to pair with you on this while you work it out.

Firefox cannot open "libgtk-3.so.0". How to circumvent?

I have two CentOS VMs which use Jenkins to run automated tests through firefox. Both have firefox installed. Both versions of firefox are the same (firefox-56.0.1). I do not know if they are both x86_64 or some other type, but whichever they are, they are the same. (I am using the same .tar.bz2 file. I copied it from one instance to the other.)
In one instance, I am able to run firefox. "firefox --headless" returns "*** You are running in headless mode."
After copying the .tar.bz2 file to the other instance and installing firefox, I find that the new instance does not have the same performance. "firefox --headless" returns the following:
XPCOMGlueLoad error for file /usr/local/firefox/libmozgtk.so:
libgtk-3.so.0: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
What might explain this difference? It appears that I did something right in the first instance, but I cannot tell what. Is there some setting that will prevent firefox from trying to use the "libgtk-3.so.0" file? This file does not exist on either instance.
I've seen this question elsewhere, but the answer seems to focus on versions (I know my version has worked in the first instance) and a particular bug that has been backlogged (this bug only bothers me for the new instance).
Problem solved minutes after asking the question.
Simply run:
yum info gtk3
Check if gtk3 is installed. If not:
yum install gtk3
My old instance had gtk3 version 3.22.10 installed. My new instance had the same available but not installed. I don't recall seeing this in any of the guides to running firefox headlessly, but a search result that I did not originally think worth checking was able to resolve this rather quickly. Credit to the folks at https://forums.fedoraforum.org/showthread.php?310652-Udating-Firefox-fedora-19
For Ubuntu or Debian distros use:
apt-get install packagekit-gtk3-module
You probably installed the wrong firefox version for 32bit on a 64bit system.
try downloading firefox with this portable installer download-mozilla-portable.sh which should work on a 64bit linux (tested in Ubuntu 19.10)

Perl script not able to connect to Oracle Database

I am getting the below error message while executing my Perl script.
Below is the error message that I am getting while compiling my scripts.
install_driver(Oracle) failed: Can't load '/xxx/usr/local/lib/perl5/site_perl/5.10.0/sun4-solaris/auto/DBD/Oracle/Oracle.so'
for module DBD::Oracle: ld.so.1: perl: fatal: libclntsh.so.10.1: open failed: No such file or directory at
/xxx/usr/local/lib/perl5/5.10.0/sun4-solaris/DynaLoader.pm line 203.
at (eval 99) line 3
Compilation failed in require at (eval 99) line 3.
Perhaps a required shared library or dll isn't installed where expected
at /xxx/xxxx/xxxx/xxxx/XXXX/CommonOracle.pm line 71
Recently Oracle have been upgraded from 10.2 to 11.0 in my system. Please help me to fix the issue? I am not the administrator of my system. Do i need to change LD_LIBRARRY_PATH? I am using Solaris OS.
You seem to have forgotten to ask a question. Let's assume it's "how can I fix this?"
Communicating with a database requires a number of things to be installed on your system.
You need the client libraries for the database system that you're using. This will be shared object (.so) files that are probably somewhere under /usr/lib.
You will need the Perl Database driver for your database engine (in your case, this is DBD::Oracle). If you install this by building it from scratch (as the cpan or cpanm commands do) then you'll almost certainly also need the development version of the above-mentioned client libraries. If you're installing pre-built binary versions (.rpm or .apt on Linux - I don't know the equivalent for Solaris) then you won't need these.
You will need the Perl DBI library.
It looks to me like DBD::Oracle is installed. And that means that DBI will be installed as well. But DBD::Oracle is having trouble finding the client libraries. This is surprising as they will hae been needed to install DBD::Oracle.
So, I suspect that either the Oracle client libraries are no longer installed or they are installed, but not in the place where DBD::Oracle is looking for them.
How was DBD::Oracle installed? Do you have a log of that installation that you can inspect for errors?
The issue has been resolved. The lib file "libclntsh.so.10.1" was missing in the library path. I have copied the file and the issue was resolved

Installing Primer3

I need to install Primer3 for my research in Windows, and I really have no idea of how to go about it. I was following the instructions mentioned here.
I'm getting to the part where I need to run
mingw32-make TESTOPTS=--windows
and I keep getting an error saying:
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Just for reference, I went into the minGW Installation manager and got the ming32-make packages, including the bin, doc, lang, and lic ones, because I really had no idea which one was the correct one.
If someone could help me, I would be very grateful! Installing these niche programs without an installation wizard is a challenge!
You will need to install mingw32-make. This is a
Windows of port of GNU Make,
a software-build tool that is supported on all operating systems,
indeed the daddy of such tools.
But make alone will not suffice. To build primer3 you will
need a Windows port of the whole GNU toolchain for building software
from source code. Without that, running make by itself will
just expose the absence of the GCC compiler and linker that it
expects to do its bidding.
This is quite a lot of software, but it is easy and quick to install and there
are several open-source offerings. I suggest you go to TDM GCC
and download the TDM64 bundle. This will give you an executable installer.
Just run it and you will end up with the complete GNU toolchain, including,
mingw32-make, in your chosen installation directory.
It will also install in your Windows launch menu the MinGW command prompt.
Launch this and you will be presented with a Windows commandline console
with its environment set up to find and run any of the GNU tools.
In this console change directory to your primer3-X.Y.Z/test directory
and then run mingw32-make TESTOPTS=--windows as per documentation.
Be forwarned that the self-tests of primer3 that are executed to
verify the build may take 1/2 hr. to 1 hr. to run, depending on your
hardware, but they will finish successfully with the steps I've
described, barring problems specific to your machine. It is a foolproof-simple build.
All the built executables are deposited in the primer3-X.Y.Z/src
directory. You may want to move them somewhere more convenient
in in your PATH.
It does seem oddly amateurish that the documentation simply
directs you to run mingw32-make with no preliminary account of
what that is or how to install it, while on the other hand it
advises that you must install perl and strongly recommends a
specific perl distribution; but evidently primer3 is open-source
scientfic software and its documentation is not bad by the standard
of that genre.

How to run ruby programs on Windows 7?

Does anyone know how to run/compile Ruby programs on Windows 7? For example you can compile Java in Eclipse, but I can't seem to find one for Ruby.
http://rubyinstaller.org/ - "The easy way to install Ruby on Windows".
Will give you the language and execution environment - everything you should need to get started.
Ruby isn't compiled, but rather interpreted. You need to install Ruby using the above link given by #ilollar.
Then, if you have the source code of a program in the file some_ruby.rb, you will execute this in cmd:
ruby some_options.rb
This is the general form of a ruby command:
ruby [ruby options] [program name] [program options]
Here is a free online book that will answer most of the question you have about Ruby if you are just starting out: http://ruby.learncodethehardway.org/book/
It's called "Learn Ruby the Hard Way", but don't let the name throw you off - the book is actually pretty easy to follow and doesn't assume you know anything about programming.
It will get you started writing Ruby and running programs for the first time.
Like ilollar said, the Ruby Installer is the best way to put Ruby on your Windows computer.
I'm currently running Ruby on Windows 7 writing Rails applications. You can do a lot on Windows with Ruby, however, you can't do everything. There are bundles of files that you can download that will help you write your Ruby programs - they are called Gems. Some gems will not run on Windows - The Ruby Racer and some versions of EventMachine are two that immediately come to mind.
This can be frustrating, but if it ever happens you can install a version of Linux in a virtual machine on your Windows computer so that you can use these gems without having to get a new machine.
You can also install Linux to run alongside Windows without having to reformat or mess with the partitions on your hard drive. There is a program called 'Wubi' that will install Ubuntu (a version of Linux) to run inside your Windows machine. It will actually let you pick Windows or Linux when you start your machine.
But all this is stuff to think about later on. You can certainly develop Ruby on Windows for now.
Also, in case you want to run just Ruby interactively, find the location where it is installed and browse to the bin subdirectory. For me this was \RailsInstaller\Ruby1.9.3\bin. In this directory there should be a file irb.bat. Double-click on it and you'll get a Ruby console session.
You can create window executables with ocra. That way you can create the app and push the app to another pc that does not have Ruby installed on it.

Resources