google-code-export / appengine-jruby

Automatically exported from code.google.com/p/appengine-jruby
0 stars 0 forks source link

Building a guestbook using Sinatra #63

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Am working with guestbook app example.  Am unable to find a solution.  it
seems like there's a problem with the bundler.  Am unable to troubleshoot
this problem.  Here's the url for the example.
http://code.google.com/p/appengine-jruby/wiki/GettingStarted

What steps will reproduce the problem?
1.I typed in this command:  dev_appserver.rb .

What is the expected output? What do you see instead?
Expected output:  Guestbook app loads inside of browser.

I see an Error message:

/usr/local/lib/site_ruby/1.8/rubygems.rb:280:in `activate': can't activate
bundler (~> 0.7.2, runtime) for ["appengine-tools-0.0.7"], already
activated bundler-0.8.1 for [] (Gem::LoadError)
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:296:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:295:in `each'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:295:in `activate'
    from /usr/local/lib/site_ruby/1.8/rubygems.rb:68:in `gem'
    from /usr/bin/dev_appserver.rb:18

What version of the product are you using? On what operating system?
bundler-0.8.1

Please provide any additional information below.

Tried to install a new bundler, but haven't come up with any other solutions.

This is the RubyGems Environment:

  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i486-linux]
  - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/

Original issue reported on code.google.com by isp...@gmail.com on 11 Jan 2010 at 5:59

GoogleCodeExporter commented 9 years ago
NOTE:  This issue concerned the guestbook Tutorial (See below.)

http://code.google.com/p/appengine-jruby/wiki/GettingStarted

Took out the installation of the new bundler gem as shown below:

gem uninstall bundler

Select gem to uninstall:
 1. bundler-0.7.2
 2. bundler-0.8.1
 3. All versions
> 2
Successfully uninstalled bundler-0.8.1
Then the tried the following command:
dev_appserver.rb .

It did NOT work.

Thereore, I conducted a search and found the new tutorial below:  

http://code.google.com/p/appengine-jruby/wiki/SinatraReloaded

I redid all the files.  Found that the following command is deprecated:

guestbook # appcfg.rb gem bundle

Sorry, the 'appcfg.rb gem' option is deprecated.
Simply update the 'Gemfile' and run 'appcfg.rb bundle .' instead.

This is the only command that worked for me:

 gem bundle

By running the code shown below, I finally have a working guestbook.  Maybe the 
old
tutorial needs updating or removal until time of update.

I'm pleased to have a working guestbook.

dev_appserver.rb .
=> Booting DevAppServer
=> Press Ctrl-C to shutdown server
=> Bundling gems
Calculating dependencies...
Updating source: http://gems.rubyforge.org
Done.
=> Packaging gems
=> Installing JRuby
=> Installing jruby-rack
=> Installing appengine-sdk
=> Generating configuration files
The server is running at http://localhost:8080/

Original comment by isp...@gmail.com on 11 Jan 2010 at 11:15

GoogleCodeExporter commented 9 years ago
A current working setup is as follows for this tutorial:
1. add <code>require 'extlib'</code> to config.ru

Inside of Gemfile:
1. gem "sinatra", "1.2.7"
2. gem "extlib"
3. gem "dm-core", "=1.0.2"

The app should run now.

Original comment by pjon...@gmail.com on 22 Dec 2011 at 4:54