Puma gem does not build with Pakyow new blog - pakyow

I am trying to get Pakyow project built, but the build stops at (gem) Puma error. I am curious how Pakyow got beyond this Puma error? Basically the gem install puma does not build/bundle.

Installing Puma on Windows
I found these steps at https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows. From there, you can find links to libraries and programs.
Install DevKit for your Ruby version, e.g. in c:\devkit
Download and unpack the OpenSSL Package, e.g. in c:\openssl (use 7Zip or PeaZip)
Copy the DLLs from the bin directory (libeay32.dll and ssleay32.dll) to your ruby/bin directory.
Open a Windows console/command prompt
Initialize the DevKit build environment by changing directory to the directory you installed DevKit cd \devkit and running the batch file devkitvars.bat
Install the puma gem with the OpenSSL packages gem install puma -- --with-opt-dir=c:\openssl
Verify in command prompt with puma -v

skylenewman's suggestion worked for my. I have a Windows 7 32-bit OS.
I also tried this on a Win7 64-bit and was hitting errors on puma gem installation. I'm not sure if it's a directory structure issue as I put the /devkit and /openssl on the F: drive instead of C:.

Related

Install dotnet core on ec2 linux AMI 2 (c6g)

I am trying to install dotnet-sdk-3.0 on linux AMI 2 ec2 instance (c6g). I am new to linux so tried couple of commands but nothing seems working for me. I tried below.
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
sudo yum install dotnet-sdk-3.1
sudo yum install dotnet-sdk-3.0
When tried above i am getting below error.
[ec2-user#ip-0-0-0-0 console]$ sudo yum install dotnet-sdk-3.0
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00
amzn2extra-docker | 3.0 kB 00:00
amzn2extra-nginx1.12 | 1.3 kB 00:00
packages-microsoft-com-prod | 3.0 kB 00:00
packages-microsoft-com-prod/primary_db | 288 kB 00:00
No package dotnet-sdk-3.0 available.
Error: Nothing to do
Then i tried
mkdir -p "$HOME/dotnet" && tar zxf dotnet-sdk-3.0.100-linux-x64.tar.gz -C "$HOME/dotnet"
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
After this tried the dotnet command but got the error. dotnet: command not found
Finally tried below:
mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-3.1.302-linux-arm64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
dotnet
dotnet --list-sdk
when i run this, i got below error
[ec2-user#ip-0-0-0-0 home]$ dotnet --list-sdk
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
at System.Environment.FailFast(System.String)
at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
at System.Globalization.GlobalizationMode..cctor()
at System.Globalization.CultureData.CreateCultureWithInvariantData()
at System.Globalization.CultureData.get_Invariant()
at System.Globalization.CultureInfo..cctor()
at System.String.ToLowerInvariant()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
at Microsoft.DotNet.Cli.Program.Main(System.String[])
Aborted
also tried to run the dotnet <dotnet-project.dll> and received this error.
Failed to load â–’râ–’), error: /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so: cannot open shared object file: No such file or directory
An error occurred while loading required library libhostpolicy.so from [/home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0]
[ec2-user#ip-0-0-0-0 console]$
I have followed the microsoft document as well.
https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos
Nothing seems working for me. Can someone please help me here, i am stuck from last 2 days.
Thanks in advance.
PS: I am completely newbie to linux.
I was able to get this to work on Amazon Linux 2 ARM64 with the following steps:
Download and build a recent version of International Components for Unicode. Amazon Linux 2 has version 50 available in the package manager, but dotnet looks for version 55 or later. When Amazon Linux updates this, this step won't be necessary anymore and can be replaced with sudo yum install icu.
Install gcc and python3 because they'll be needed for building libicu. It takes a few minutes to build the library. Amazon Linux 2 recently added libicu60 to the package manager, so you can simply install it with yum:
sudo yum -y install libicu60
Follow the instructions from Microsoft to install the dotnet sdk. Download the dotnet sdk from the Microsoft Website. You may need to download from this link to get the latest version, but the link below worked for me.
cd ~
wget https://download.visualstudio.microsoft.com/download/pr/5ee48114-19bf-4a28-89b6-37cab15ec3f2/f5d1f54ca93ceb8be7d8e37029c8e0f2/dotnet-sdk-3.1.302-linux-arm64.tar.gz
mkdir -p $HOME/dotnet && tar zxf ~/dotnet-sdk-3.1.302-linux-arm64.tar.gz -C $HOME/dotnet
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
Test that it's working
[ec2-user#ip-172-31-69-243 ~]$ dotnet --list-sdks
3.1.302 [/home/ec2-user/dotnet/sdk]
You are running this on arm64/aarch64. It's a relatively new architecture. It's also incompatible with the Intel 64-bit architecture (x86_64 or x64). So you need to watch out for that.
Installing via RPM
Edit: So, this is just not going to work if you want to use RPM packages.
Quoting https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos:
Package manager installs are only supported on the x64 architecture. Other architectures, such as ARM, must manually install the .NET Core SDK or .NET Core Runtime. For more information, see the manually install section below.
You are using aarch64/arm64. You are not using x64, so this is not going to work.
You need to use the tarball installation method.
Out of date suggestions:
I am trying to install dotnet-sdk-3.0 on linux AMI 2 ec2 instance (c6g).
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
You are running Amazon Linux 2, right? As the URL here says, this is for CentOS 7. It may (or it may not) work on your Linux distribution. Anyway, try it out.
$ sudo yum install dotnet-sdk-3.0
No package dotnet-sdk-3.0 available.
Error: Nothing to do
The error says that it can't find this package. Maybe a package with this name doesn't exist? Maybe you are using the wrong name? Try using yum list to find the correct name:
sudo yum list 'dotnet-sdk*'
It should show you a list of packages, including names like dotnet-sdk-3.0.103. You can install that package by name, then:
sudo yum install dotnet-sdk-3.0.103
If that doesn't work, try another package name from yum list and try installing that.
Installing manually
Then i tried
mkdir -p "$HOME/dotnet" && tar zxf dotnet-sdk-3.0.100-linux-x64.tar.gz -C "$HOME/dotnet"
export DOTNET_ROOT=$HOME/dotnet
export PATH=$PATH:$HOME/dotnet
After this tried the dotnet command but got the error. dotnet: command not found
You are running an aarch64 machine. You need to use the arm64 tarball, not the x64 tarball. The x64 tarball is for an Intel processor. It will not work on an ARM processor.
That's surprising. Let me break down what this set of steps is doing:
mkdir -p "$HOME/dotnet" creates a directory named dotnet in your home directory
tar xf ... extracts the dotnet SDK tarball in the dotnet directory you created in step 1
export DOTNET_ROOT=$HOME/dotnet defines an environment variable DOTNET_ROOT. .NET Runtime needs it; I am a bit fuzzy myself on why
export PATH=$PATH:$HOME/dotnet adds the directory you installed the .NET SDK into to the environment variable PATH. PATH is a list of locations that the OS uses to search for a command that you enter. For example, when you type dotnet in the command line it searches for dotnet executable (think dotnet.exe on Windows) in this list of directories.
So let's try and debug it one by one:
Does the directory dotnet exist in your main home directory (aka $HOME)? Can you cd ~/dotnet? Does that work?
After you extract the tarball, do you see a file named dotnet in the dotnet directory in your $HOME? Does ls $HOME/dotnet/dotnet work? What does it show you?
What does echo $PATH show you? Does it include that dotnet directory in the value?
If you run which dotnet, does it find the dotnet executable in your main $HOME directory?
Running the SDK
when i run this, i got below error
[ec2-user#ip-0-0-0-0 home]$ dotnet --list-sdk
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support
The error includes this phrase: Couldn't find a valid ICU package installed on the system.
It really means that. You need to install the ICU package for your Linux distribution:
sudo yum install libicu
And then try running dotnet --list-sdk again.
Error Running dll
Failed to load â–’râ–’), error: /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so: cannot open shared object file: No such file or directory
An error occurred while loading required library libhostpolicy.so from [/home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0]
This is strange. It says it can't find a file that should be part of the .NET Core installation.
What does dotnet --list-runtimes say? Does it show the 3.0.0 runtime installed? If not, that means your installation is messed up. You should probably install .NET Core 3.0 again. (Or better yet, install 3.1 because 3.0 has been end-of-life'd).
Does the file /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so exist? If it doesn't it's the same problem as above: your installation is messed up.
What does file /home/ec2-user/dotnet/shared/Microsoft.NETCore.App/3.0.0/libhostpolicy.so say? Is it an ELF 64-bit LSB shared object?
The output is: ELF 64-bit LSB shared object, x86-64
This is a x86-64 file! In other words, you have (somehow) installed an linux-x64 (Intel 64-bit architecture) runtime. Not too surprisingly, it doens't work on the ARM 64 bit architecture. You need to delete this and re-install the SDK. I suggest just blowing away your current installation (rm -rf $HOME/dotnet) and install the linux-arm64 SDK again.

jruby/cucumber: Bundle install doesn't install any gem

I'm on Windows 10 x64 and I've installed JRuby 1.7.8 (I tried the files for x64 and 32bits with the same problem) and JRE 7.
I was trying to have my Cucumber Test Framework running on a different machine. I downloaded my current branch (which is working fine in other computers, with all the settings: env.rb, Gemfile, etc) and then I installed successfully these 2 gems:
gem install bundler
gem install cucumber
The Gemfile I have contains loads of gems, similar to:
source 'https://rubygems.org'
gem "httpclient"
gem "watir-webdriver"
but when I execute:
bundle install
I just get this line and nothing gets installed, it finishes almost immediately. No Gemfile.lock is created, etc.
D:\project>bundle install
io/console not supported; tty will not be manipulated
D:\project>
Any idea what could be wrong and what I could try please?
Not quite sure if the issue has anything to do with the line above (which I had never seen in the other machines that are working). If it's not related and you've got an idea about both problems, please let me know and I'll have a look as well...
I've been trying for a few more hours and still not success, adding further info in case someone can spot something pls. Even 'bundle -v' doesn't work on this machine?!
D:\project>gem list
io/console not supported; tty will not be manipulated
*** LOCAL GEMS ***
builder (3.2.2)
bundler (1.13.2)
cucumber (2.4.0)
cucumber-core (1.5.0)
cucumber-wire (0.0.1)
diff-lcs (1.2.5)
gherkin (4.0.0)
jruby-win32ole (0.8.5)
multi_json (1.12.1)
multi_test (0.1.2)
rake (10.1.0)
D:\project>bundle -v
io/console not supported; tty will not be manipulated
D:\project>
Cheers!!
You have the latest version of bundler 1.13.2 installed and I have seen it cause different types of issues depending on the jruby version and some other gems. Bundler 1.10.6 works everytime for my Jruby 1.7.x.
Try these:
gem uninstall bundler
and
gem install bundler -v 1.10.6
Although I am not particularly familiar with jruby, it appears to be a bug, which is resolved in JRuby 1.7.24.
I would verify that the other computers this is working on are still on that version of jruby (assuming they are windows boxes).

Vagrant Installation in Debian Os

I have been trying to install and set up vagrant in my local machine which runs on debian OS for PHP project.
As mentioned in the link https://www.virtualbox.org/wiki/Linux_Downloads, I followed all the setups listed for installing Virtual Box initially. After successful installation I tried installing Vagrant by downloading it from official website. Once all installation is done, I create a directory called website cd into it and gave the command
Vagrant init
For vagrant initialization. But vagrant returns me the following error. How to resolve this?
Vagrant experienced a version conflict with some installed plugins!
This usually happens if you recently upgraded Vagrant. As part of the
upgrade process, some existing plugins are no longer compatible with
this version of Vagrant. The recommended way to fix this is to remove
your existing plugins and reinstall them one-by-one. To remove all
plugins:
rm -r ~/.vagrant.d/plugins.json ~/.vagrant.d/gems
Note if you have an alternate VAGRANT_HOME environmental variable
set, the folders above will be in that directory rather than your
user's home directory.
The error message is shown below:
Bundler could not find compatible versions for gem "rest-client":
In Gemfile:
vagrant (= 1.7.0) ruby depends on
rest-client (~> 1.7) ruby
vagrant-share (>= 0) ruby depends on
rest-client (1.6.8)

downgrade chef-client version 11

trying to downgrade chef-client. enclosed a snippet:
$ chef-client --version
Chef: 11.10.4
$ curl -sL https://www.opscode.com/chef/install.sh | sudo bash -s -- -v 11.8.2
Downloading Chef 11.8.2 for ubuntu...
downloading https://www.opscode.com/chef/metadata?v=11.8.2&prerelease=false&nightlies=false&p=ubuntu&pv=12.04&m=x86_64
to file /tmp/install.sh.1934/metadata.txt
trying wget...
url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.8.2-1.ubuntu.12.04_amd64.deb
md5 3d3b3662830a44eeec71aadc098a4018
sha256 a5b00a24e68e29a01c7ab9de5cdaf0cc9fd1c889599ad9af70293e5b4de8615c
downloaded metadata file looks valid...
downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.8.2-1.ubuntu.12.04_amd64.deb
to file /tmp/install.sh.1934/chef_11.8.2-1.ubuntu.12.04_amd64.deb
trying wget...
Comparing checksum with sha256sum...
Installing Chef 11.8.2
installing with dpkg...
(Reading database ... 107385 files and directories currently installed.)
Preparing to replace chef 11.8.2-1.ubuntu.12.04 (using .../chef_11.8.2-1.ubuntu.12.04_amd64.deb) ...
Unpacking replacement chef ...
Setting up chef (11.8.2-1.ubuntu.12.04) ...
Thank you for installing Chef!
$ chef-client --version
Chef: 11.10.4
also tried rebooting the machine, though there result is the same.
can it be done, can chef-client be downgraded?
If you installed Chef 11.10.4 from the omnibus installer (basically the same install.sh you are using for the older version) then you basically got a self-contained installation of Chef inside /opt/chef.
Removing that directory will remove almost all traces of the old install. All that is left is to remove the symlinks inside /usr/bin, which will probably be chef-client, chef-solo, chef-shell, knife, ohai and maybe a few others (look for symlinked files in /usr/bin that point to /opt/chef.
After that, reinstall using your above technique and you should have the correct version installed.
Just install specific version from https://downloads.chef.io/chef (depends on your OS). I succeeded to downgrade my chef-client version with simple installation that override the newer one.

"spawn.h not found" while installing octopress on Cygwin

I have been trying to install octopress on cygwin. I have googled but no avail. I hope that someone can suggest a hack (no matter how complicated) to resolve this.
I followed the octopress installation instructions. Everything went smoothly till the bundle install stage. When I reached that point, the installation quits with the error telling that it couldn't find spawn.h.
I searched and apparently spawn.h doesn't come in any of the cygwin libraries. I installed all the c++ libraries I could from cygwin setup but that did not help.
Can you please help resolve this?
I think the gem that fails in this process is posix-spawn. For this, you could install the gem locally:
$ gem install rake-compiler -v 0.7.6
$ git clone git://github.com/rtomayko/posix-spawn.git
$ cd posix-spawn
$ rake gem
$ cd pkg/posix-spawn-0.3.6
$ gem install --local posix-spawn-0.3.6.gem
The explanation (from an article I found):
There is a bug in the version of posix-spawn in the gem repositories however that makes installing via gem impossible on Cygwin
After this, try bundle install again, it should be successful.
Here's a related issue on the GitHub project
UPDATE: I recently installed scoop a command-line installer for Windows, a pretty easy setup. I installed Ruby, bundler and octopress without breaking a sweat. You should give it a try.

Resources