Rails server does not start by command Rails s
You need to create a new Rails app (unless you already have one)
rails new my_app
Go to your app directory
cd my_app
Start the server in that directory
rails s
Rails Server is not starting on Windows 10
The problem my be caused due to following (Unable to Install gems)
if you are using latest version of ruby installer to install ruby then there are problem for installing nokogiri and ulifier or other gem which needs to compailing in your pc. so you needs to install devkit first. For this please do following:
The download is a self-extracting archive. When you execute the file, it’ll ask you for a destination for the files. Enter a path that has no spaces in it. We recommend something simple, like C:\RubyDevKit\
. Click Extract and wait until the process is finished.
Download from here
Next, you need to initialize the DevKit and bind it to your Ruby installation. Open your favorite command line tool and navigate to the folder you extracted the DevKit into.
cd C:\RubyDevKit
Auto-detect Ruby installations and add them to a configuration file for the next step.
ruby dk.rb init
Install the DevKit, binding it to your Ruby installation.
ruby dk.rb install
Now run bundle install
If still problem persist downgrade your ruby or install linux distro.
Rails server doesn't start in production
Just try rails s -b 0.0.0.0
And stop previous port 3000 used by rails
To stop previous port. Try this command Lsof wni -p 3000
If you are running on 3000
port
When I try to run rails s or rails server command I get an error and It does not let me start the server
I can suggest you for now or until Nokogiri release new version with windows support.
Solution-1:
Change your development platform to linux or it's flavours like Ubuntu.
Solution-2:
Downgrade your ruby version to 2.1 or lower. Once Nokogiri release new version with windows support then you can upgrade ruby to 2.2 .
To downgrade ruby versions use RVM or similar tool to maintain/manage the ruby versions. But I am not sure RVM will work on Windows platform you can refer this stackoverflow link .
Related Topics
If 'Main' Is an Instance of 'Object', Why Can't I Call It
Obtaining a Facebook Auth Token for a Command-Line (Desktop) Application
How to Transpose Different Sized Ruby Arrays
R Statistical Package Gem for a Rails Application
Ruby: Converting from Float to Integer in Ruby Produces Strange Results
How to Rescue from a Require "Gem_Name" When the Gem Is Not Installed
How to Setup a Local Ssl Certificate and a Rails Application
Error Loading Active Record Gem with Sinatra App Using Rvm
Ruby: Building a Plot of Function
Inherit Class-Level Instance Variables in Ruby
Error in Celluloid Gem Installation
Undefined Local Variable Based on Syntax in Ruby
Install Cocoapods Failed on MAC
Rbenv Install Ruby Build Failed