In ubuntu, RailsServer encounters the couldnotfinda1_criptruntime problem.
Source: Internet
Author: User
It was very difficult to install Rails on ubuntu today, and the installation was successful. However, you still encounter problems when starting the server. The main error message is couldnotfinda1_criptruntime. I checked a lot of information on the internet. This means that the js runtime environment was not found. Today, it was very difficult to install Rails on ubuntu, and finally the installation was successful. However, when starting the server, the main error message is cocould not find a JavaScript runtime. I checked a lot of information on the internet. This means that the js runtime environment is not found. it is installed by default in windows, but it must be installed by myself in ubuntu, at the beginning, add the following statement to Gemfile:
Gem 'execjs'
Gem 'therubyacer'
Then run bundle install
When I did this, it showed that therubyacer was not found, so I had to continue to find the solution and finally find it. the following command:
Sudo apt-get install python-software-properties sudo add-apt-repository ppa: chris-lea/node. js sudo apt-get update sudo apt-get install nodejs
Then there is no problem.
Also encountered a problem: ARN TCPServer Error: Address already in use-bind (2) Exiting
The prompt message is that the port you enabled is occupied, so:
1. enter the command (find the pid of port 3000 ):
Netstat-tulpn | grep 3000
Of course, you will see -->
Tcp 0 0 127.0.0.1.3000 0.0.0.0: * LISTEN
1877/ruby
2. run the following command to kill the occupied pid ):
Kill-9 1877
3. restart ruby script/server.
Method 2:
Run the ps command to view all processes enabled on the current terminal. of course, you will find a ruby process. we can see its PID (assuming the PID is 6523 ). Therefore, execute the following command:
Kill-9 6532
Then re-enter the rails project and start ruby script/server.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service