Labs/Bespin/DeveloperGuide/Setup: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Thanks for downloading the code to the Bespin project. You can easily get Bespin's Python server running on your local Mac or Linux machine (see note about Windows below).
Thanks for downloading the code to the Bespin project. You can easily get Bespin's Python server running on your local Mac or Linux machine (see note about Windows below).
==Current Status Note==
We are in the middle of a process that we're calling the "Reboot". It's not a rewrite of Bespin, but a major refactoring. The current developer setup process is not as simple as it will ultimately become, and the Bespin that you'll have at the end of it is missing a lot.
Consider this your official warning that ''there be dragons here''.


== Prerequisites ==
== Prerequisites ==
Line 13: Line 7:
*Mercurial  
*Mercurial  
*Python 2.5 or 2.6  
*Python 2.5 or 2.6  
Python 2.6 is preferred.


'''NOTE FOR LINUX USERS:''' ''If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".''  
'''NOTE FOR LINUX USERS:''' ''If you are running on a Linux system, you will likely need a "python-dev" and "ruby1.8-dev" (on Ubuntu; possibly "python-devel" elsewhere) package installed, if you do not already have it. If you want to build the embedded release, you will want libyaml: the package on Ubuntu is "libyaml-dev".''  
Line 34: Line 30:
     python bootstrap.py --no-site-packages
     python bootstrap.py --no-site-packages
    
    
to get the environment set up. This is built around [http://pypi.python.org/pypi/virtualenv virtualenv].
to get the environment set up. This is built around [http://pypi.python.org/pypi/virtualenv virtualenv]. Please watch for helpful hints and instructions on screen.


After running the bootstrap script, please follow the additional instructions that are displayed on the screen.
In Unix-like environments, the next step is to activate the virtualenv using this command:


==Starting the development server==
    source bin/activate
If you are no longer (or not yet) in the virtualenv environment run within the bespinclient directory:


  source bin/activate
on Windows, the command is Scripts/activate.bat


To start the server execute:
Once the virtualenv is activate, you need to get the server set up:


  paver start
    paver install_server


This will start the Bespin backend as well as the Sproutcore server. You can now access the Bespin editor at http://localhost:4020/editor/ in you browser.
And the first time around, you're also going to want to get a database set up:


Have fun!
    paver create_db


==Run SproutCore's build server==
If you have some trouble on macos x like the error message: ImportError: No module named `xxx'
It's probably cause the server side is not completely installed so try
    cd ../bespinserver
    paver develop
    paver create_db


If you are hacking on SproutCore, you'll want to run SproutCore's build server. Additionally, you'll need:
==Starting the development server==


*Git
If you are no longer (or not yet) in the virtualenv environment run within the bespinclient directory:
*Ruby 1.8 or 1.9 (1.9 is faster)
*The following RubyGems: <tt>rack jeweler json_pure extlib erubis thor</tt>


   <code>gem install rack jeweler json_pure extlib erubis thor</code>
   source bin/activate


Optionally, you may want the <tt>thin</tt> library, which will improve performance over the default WEBrick:
To start the server execute:


   <code>gem install thin</code>
   paver start


Install additional SproutCore stuff within bespinclient using:
This will start the Bespin server. You can now access the Bespin editor at http://localhost:8080/ in you browser.


  paver install_sproutcore -g
Have fun!
 
Here's how you start up:
 
  paver server.abbot=1 start
 
You can now access the Bespin editor at http://localhost:4020/editor/ in you browser.


==More Documentation==
==More Documentation==


Documentation can be found in the docs directory of "bespinclient".
The documentation of the last release is [https://bespin.mozillalabs.com/docs/ here].


==Contributing to Bespin==
==Contributing to Bespin==
27

edits