How do you install a Ruby on Rails apps on Windows/IIS? - ruby

I'm trying to get Redmine working on Windows/IIS 7. I've found several walkthroughs online, but none of them work on my Windows Server 2008 R2 box. I got a simple app (create app, no customization) to get as far as RoR error, but Redmine itself shows a 500 error (ruby.exe exited unexpectedly). I installed sqlite since some guides mention that, though Redmine uses MySQL by default. I started with the Bitnami installer and tried to customize for IIS, RorIIS, FastCGI, lots of things that look like they should work, but this problem is killing me.
If I run ruby.exe from the command line, passing it the path to the dispath.fcgi file I get an error: "The procedure entry point SetMagickMemoryMethods could not be located in the dynamic link library CORE_RL_magick_.dll". I had to install the rmagick gem myself which seemed strange since everything worked perfectly under Apache. I really thought it would be a smooth cut-over since it's up and running already and just changing web server.
Any help is much appreciated.

I've tried a lot to install Redmine on Windows environment under IIS. There's very little (or none) documentation about it. Lost many days on this. In the end, I decided to stick to the Bitnami stack of Redmine. The only caveat is that we had to use another port (8080, in our case), that's it. I gave up the idea of integrating Redmine/RoR with IIS and never looked back. Everything is working great in production now and everyone is happy about it around here.
Sorry I can't give a better answer than that, I'm just sharing some recent experience. I was obsessed about integrating RoR/ISS until I realized it was not a real requirement, it was just something I stuck into my mind. Think about it.

Related

IIS Manager is installed but shows empty page

I hope this is the right place to ask. I was thinking serverfault might not be correct, since the computer in question is not a server. Feel free to migrate if StackOverflow is not right.
I usually install IIS on servers but have installed it on Workstations before. I actually had the same problem with another machine of the same model a few weeks ago but can't remember how I resolved it. I must have installed additional features or run some powershell-command that did not resolve the issue on this machine.
I installed IIS the correct way using the Windows Features, as described in the answers to this question. I've actually removed and reinstalled it since then, but it hasn't resolved my problem.
The WWW publishing service is running and I can open the IIS Manager, but it's completely empty, unlike here where the IIS Manager at least shows the local computer
When I type localhost into a browser I don't see the IIS Startpage, I get the error ERR_CONNECTION_REFUSED
You can see that all the required checkboxes are checked:
And the service seems to be running.
I've since tried installing IIS using
DISM:
Powershell:
And I checked the status using the iisreset command which was mentioned in the comments here (second linked question upstairs):
It restarts without any error and says everything is working fine.
Has anyone ever encountered this before or might know what I could try to get IIS actually working?
Edit:
I just noticed, while trying to uninstall IIS, that I can not uninstall it. I used Windows-Features and confirmed to reboot when prompted, but while rebooting Windows does a rollback and IIS is still available. So I can't even uninstall it.
Also just found this similar quesion on SuperUser. I'm still trying some suggestions there. So far to no avail.
Thanks for the comments.
I was on vacation, but a colleague was able to fix the problem.
Unfortunately, the solution was to reset Windows 11. He was then able to install IIS through Windows Features and it worked.
No idea why it didn't work in the first place, or why it got to this unrecoverable state. But now everything is fine.

Shopify CLI - Ngrok error when serving app

I am on a windows 10 machine and trying to use the Shopify App CLI to create apps, but I am running into some errors.
First I installed ruby so I could use the gem command to install the Shopify App CLI, as explained here.
When running shopify version as explained in the above documentation, I get the following output:
bash: shopify: command not found
After googling for a bit I found a solution to this problem, by running shopify.bat version. With this command I can use the CLI.
Moving on, I tried following this tutorial to create my first Shopify App. I used shopify.bat create node to create my app, moved into the folder and ran shopify.bat serve to serve my app locally.
Now the following problem arises:
It starts promising by installing ngrok:
But after waiting for a bit, I get the following output (Sorry for the screenshot, I could not get it to look normal with inline code):
What I also notice is that it uses C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/shopify-cli-1.4.0/ as the path to the CLI, but when looking on Google, most people have /home/[USER]/.shopify-app-cli/ as the path to the CLI. This path does not exist on my machine.
So I would like to know why first of all the serving of the app won't work, because ngrok can't be found, and second why ~/home/user/.shopify-app-cli does not exist.
Thanks in advance,
Mike
I think modern Windows come with Linux now. Since the Internet runs on Linux, you might find development and following tutorials much easier if you use Linux, since all these inconveniences of Windows disappear. Unless you are already super handy with all the quirks of Windows to work around their results, it could be your ticket!
That being said, I mastered this development pattern using *nix and it remains pretty advanced to actually have a smooth workflow for both localhost and production development. Ngrok itself is painful without paying for the service and using puma-dev and puma-ngrok... I laugh when I think about how those essentials running under Windows will be for you.

CouchDB can't set up HTTPS

I am learning to work with CouchDB and I am usually making Ajax calls in order to communicate with my database. I started getting '
Cross-Origin Request blocked
' and as the reason
Access-Control-Allow-Origin
, so I decided to work with CouchDB through HTTPS and not the standard HTTP. For that, I have followed the instructions given on Link to manual.
Problem on Linux:
I first tried to set it up on my laptop where I use Linux. But I couldn't find the Local.ini file where I was supposed to set the paths to the certificates.
After unsuccessfully trying to find a solution for it, I gave up and started from the beginning on my computer, where I use Windows.
Problem on Windows:
So I installed the newest version of CouchDB on my Windows, I have created the certificates, found the Local.ini file, did everything as it is explained in the manual. The problem was that I couldn't restart CouchDB so that the changes would take place. So, after google-ing the problem, I found a possible solution, to stop CouchDB through the Task Manager->Services-> Stop Apache CouchDB. But when I tried to Start it again I get the problem
Windows could not start the Apache CouchDB on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specification error code 3.
I would be very happy if someone could help me with my problem(s). I prefer getting a solution for the Linux problem since I work mostly on my laptop, but I will be satisfied if I get it going even on Windows.
Thanks in advance
On Linux, you can add CORS to CouchDB with this package:
https://github.com/pouchdb/add-cors-to-couchdb

WAMP or XAMPP alternative that has Imagick already included

Recently lost my hard drive where I had WAMP installed and Imagick working.
Someone else did that part for me way back.
Reinstalling Win7 and getting everything working again = nightmare.
So I installed the latest version of WAMP - NO Imagick.
3 days of trying all the solutions on this site (and some others - sorry) and got nowhere.
Does anyone know of a "one shot" installation that will work out the box?
Maybe a fork of one of them - I looked but found nothing
Or maybe I should install Ubuntu onto an old PC and use that as a web server on my home LAN?
Seriously - they are depreciating the GD library some time soon and Imagick is apparently the successor but no-one supports Imagick natively.
Jumping through all sorts of hoops is no guarantee that it will work either as I have painfully found out.
Thanks in advance people.
WAMP and XAMPP are not up to speed with the transition from the soon to be removed GD library to the ImageMagic library and it would seem that neither are planning to bring their products up to date any time soon.
That leaves many users with a major problem as most web site developers need to be able to manipulate images at some time or another during their work.
For users who are not at a reasonably high level of expertize as far as messing around in the guts of the (in my case, Windows) operating systems, this is a nightmare and can be downright dangerous.
I did find what seemed to be a viable alternative in WampDeveloper Pro but unless you specifically go looking for it, their website is very hush-hush about the fact that its going to cost you over $125 to get it working.
You only find out about this at the first run after installing.
So my options are the following:
Put one of the Ubuntu distributions on a VM
or
Find an old drive, install it into your PC and make the PC dual boot using a Ubuntu distribution.
The second option will "ease" me into converting from Microsoft based OS reliance to a Linux based OS however if that does not work out, I do have the option to create an Ubuntu VM under the Windows system (I have used VM for a while under Windows) and use that in place of the other Windows based web server alternatives.
Either way I will be able to carry on servicing my clients and making a living without spending money or having a stroke due to pure frustration.
I may regret this decision BUT I may start wondering to myself "Now why did you wait so long?"

Getting cf10 to work with Apache on Mavericks

We've installed cf10 on a Mac with Mavericks.
All seemed to go well. We didn't get any errors.
Apache is running fine. We've setup a virtual host, and it is serving html files fine.
Coldfusion Administrator is running fine at 127.0.0.1:8050
Yes, we did select Apache when installing CF (pointing config to /public/etc/apache2/).
But when we run a .cfm page from the virtual host on Apache, it just renders the contents of the .cfm page to the browser as text (e.g. just get's render as text).
We have read and worked through the myriad of blog posts on how to get CF10 working on Mavericks, but with no luck, and we are starting to wonder that this may not be the problem.. as neither cf10, nor apache are 'broken' as such. It just seems that apache is not passing .cfm file to cf for processing.
Can anyone suggest something we may be missing?
Many Thanks
This is because the connector is broken currently. I recently moved to mac so I encountered the same issue. This article provides a working solution. It looks like a lot but it doesn't take long if you take time to read through it.
http://www.cfdad.com/2013/10/27/how-to-compile-adobe-coldfusion-10-apache-connector-for-osx-mavericks-10-9/
EDIT: Sorry I should provide the source for the bug: https://bugbase.adobe.com/index.cfm?event=bug&id=3653076
It might be a simple as running the web server connection utility. That's all I had to do with OSX 10.8. Brian blogged that this was all he had to do.
http://brianflove.com/2013/10/23/os-x-mavericks-and-apache/
You just have to tell it where the /conf/ folder is now located. We both used /private/etc/apache2/, not /public/.

Resources