title: How shall I migrate to opal 0.7.0.beta
body: <p>I tried to upgrade to use Opal 0.7.0.beta. I want to compile to a static app and follow the steps in <a href="http://opalrb.org/docs/static_applications/" rel="nofollow">http://opalrb.org/docs/static_applications/</a></p>
  
  <p>My Rakefile looks like the one below. The questions:</p>
  
  <ol>
  <li><p>How do I need to rework the :build task to get rid of the deprecation message. i tried. to use Opal::Server instead of Opal::Environment but it did not work.</p></li>
  <li><p>I get `Opal already loaded. Loading twice can cause troubles, please fix your setup.``</p></li>
  <li><p>I get <code>undefined is not a function</code> in the generated javascript <code>Opal.mark_as_loaded(Opal.normalize_loadable_path("corelib/runtime"));</code></p></li>
  </ol>
  
  <p>Thanks for Opal and thanks for any advice.</p>
  
  <pre class="lang-ruby prettyprint-override"><code># Rakefile
  require 'opal'
  require 'opal/sprockets/environment'
  require 'opal-jquery'
  require 'erb'
  require 'zip'
  
  
  ZUPFNOTER_JS = "../deploy_files/build.js"
  
  
  desc "Build our app to #{ZUPFNOTER_JS}"
  task :build do
    env = Opal::Environment.new
    env.append_path "."
    env.use_gem "vector2d"
  
    File.open(ZUPFNOTER_JS, "w+") do |out|
      out &lt;&lt; env["application"].to_s
    end
  
    Dir.glob "../public/*.scss" do |f|
      cmd = "sass #{f} &gt; #{File.dirname(f)}/#{File.basename(f, ".scss")}.css"
      puts sh cmd
    end
  end
  
  ...
  </code></pre>
  
  <p></p>