Hack-R Hack-R - 1 year ago 83
Ruby Question

What needs to be changed to run a Rails app created on Windows in Linux?

An intern made a Rails app on his Windows computer several months ago.

I transitioned his files to a RHEL server and installed Ruby, rubygems, Rails, and Ruby Version Manager.

I believe that to run his app on Windows I could just do

bin/rails server

However, when I try this on the server it says

/usr/bin/env: ruby.exe No such file or directory

So, apparently it's still expecting a Windows (.exe) version of Ruby. What do I need to do to transition this Windows app to Linux?

Answer Source

Check in the bin/rails file on your proyect path, probably there's a call to ruby.exe there, it's probably in the first line, change it to this

 #!/usr/bin/env ruby

Probably this errors is in other files in the bin folder, check it and change it.

Also, migrating an app from windows to linux can leverage into a lot of issues, so you would need to debug it with pacience. Good luck!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download