blog.christoffer.me

Hi, my name is Christoffer and I am an Internet addict.

2015-07-31 19:22

How to install Dart SDK in the Cloud 9 IDE

Cloud9 is a pretty cool cloud based IDE. Even though it does not support Dart code formatting, you can still develop and run Dart server applications in the IDE by downloading and installing the Dart SDK.

Here is how to do it.

  • Downloading the SDK
  • Extracting
  • Configure as global command
  • Testing it all

Download the SDK

The first thing you need to do is to figure out is if you are on a 32 or a 64 bit architecture. Most likely you are on a 64 bit, but let's make sure. To do that you can type in the command:

uname –a

Here we can see are on a 64 bit machine, so we need to download the 64 bit version of the Dart SDK for Linux on their archive page:

https://www.dartlang.org/downloads/archive/

Copy the URL, as we are going to use it later. In my case, at the time I published this blog post, the URL is:

https://storage.googleapis.com/dart-archive/channels/stable/release/1.11.1/sdk/dartsdk-linux-x64-release.zip

Open up a terminal in the Cloud 9 IDE and go to your home directory:

cd ~

and download the SDK with wget:

wget https://storage.googleapis.com/dart-archive/channels/stable/release/latest/sdk/dartsdk-linux-x64-release.zip

After it has been downloaded type ls and you should see it:

Extracting

To extract the archive we simply use the unzip command:

unzip dartsdk-linux-x64-release.zip -d dartsdk-1-11-1

I am naming the directory to dartsdk-1-11-1 because I like to add the SDK version number into the directory name.

Once completed, we should be able to use ls again to see the newly created directory:

Configure as global command

If you read the Dart SDK page it tells us how to make Dart as a global command using the export command

So in our case, the full syntax will be

export PATH=${PATH}:~/dartsdk-1-11-1/dart-sdk/bin/

We can check if was added successful by typing

echo $PATH

Testing it all

Now if we return to our workspace directory (cd ~/workspace/) we can see that we have access to Dart by simple typing dart

Reddit comments link

https://www.reddit.com/r/dartlang/comments/3fblyw/howtoinstalldartsdkinthecloud9_ide/

Search the site

About Christoffer

Christoffer is a software and web developer, with primary expertise in the Java, JavaScript and Dart programming languages.

Always interested in learning new and exciting new technologies and solutions within software- and web-development and the Internet, while suffering from the classic "I can't stop thinking" syndrome.

Currently working as a Front End Web Engineer at Netset, while working on his own ideas and projects via his own software company during his spare time.

Please keep in mind that any opinions expressed here are Christoffer's own opinions and does not necessarily reflect those of his employer, or any other companies, organizations, groups or individuals.

Previous posts