cloud9-ide

Cloud 9 IDE can't connect to database

不羁岁月 提交于 2019-11-28 11:01:33
问题 I have tried a number of things to connect to my database in cloud 9 but I keep getting similar errors. This is my PHP code: <?php // Create connection $con=mysqli_connect($IP, "$C9_USER", "", "c9"); //(host,username,password,dbname)<- guide for me // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } ?> I took the basic code from w3schools and I used it with a document explaining how cloud 9's mysql database works: https://docs.c9

Rails Tutorial Error With Cloud 9

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 22:52:39
问题 Trying to get this to work, but I'm having trouble. I'm following the instructions at: https://www.railstutorial.org/book/beginning#cha-beginning I get to 1.3.2 and I type: rails server -b $IP -p $PORT Which results in this error instead of WEBrick running: /usr/local/rvm/gems/ruby-2.1.5@rails4/gems/sass-rails-5.0.1/lib/sass/rails/helpers.rb:11:in `<top (required)>': uninitialized constant Sass::Script (NameError) from /usr/local/rvm/gems/ruby-2.1.5@rails4/gems/sass-rails-5.0.1/lib/sass/rails

I am getting an “Invalid Host header” message, when running my React app in a Webpack dev server on Cloud9.io

﹥>﹥吖頭↗ 提交于 2019-11-27 17:05:34
I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server. I launch it with: webpack-dev-server -d --watch --history-api-fallback --host $IP --port $PORT $IP is a variable that has the host address $PORT has the port number. I am instructed to use these vars when deploying an app in Cloud 9, as they have the default IP and PORT info. The server boots up and compiles the code, no problem, it is not showing me the index file though. Only a blank screen with "Invalid Host header" as text. This is

Cloud9 postgres

拜拜、爱过 提交于 2019-11-27 07:01:09
I am trying to set up a postgres database in a Rails app in Cloud9. I have followed the instructions here: https://docs.c9.io/setting_up_postgresql.html and set up a database called cc_database. My database.yml file looks like this: development: adapter: postgresql encoding: SQL_ASCII database: cc_database pool: 5 username: postgres password: password When I run rake db:setup I get the following error: PG::ConnectionBad: FATAL: Peer authentication failed for user "postgres" I am quite new to all this, so any advice would be much appreciated. Tony Nguyen Do the following steps: Create a new

How can I take console input from a user in node.js?

一世执手 提交于 2019-11-27 04:39:39
问题 I tried moving to cloud9 as a full time IDE as it seems to be the best option on my chromebook. However, I'm trying to make a basic program that requires text input from the user but the code i was taught var x = prompt("y"); doesnt seem to work in node.js. How can I take user input and store it as a variable in node.js? 回答1: var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question("What do you think of node.js? ",

I am getting an “Invalid Host header” message, when running my React app in a Webpack dev server on Cloud9.io

安稳与你 提交于 2019-11-26 22:30:54
问题 I am using as an environment, a Cloud9.io ubuntu VM Online IDE and I have reduced by troubleshooting this error to just running the app with Webpack dev server. I launch it with: webpack-dev-server -d --watch --history-api-fallback --host $IP --port $PORT $IP is a variable that has the host address $PORT has the port number. I am instructed to use these vars when deploying an app in Cloud 9, as they have the default IP and PORT info. The server boots up and compiles the code, no problem, it