Is it possible to get v1.12.12?

Support Ticket

+status
+tags
 

I know it's installed on my cloudstore site, but when my friend installed an instance just now, he got 1.12.6.

 

All versions since 1.12.6 have been coming out as the gem; you can certainly install that way to get the latest code. The source code is available from the develop branch on github; the readme there would be helpful when installing.

 

The reason your friend gets 1.12.6 is that he's installing from the master branch. We've been planning to bring all the gem code into the master branch with 1.13. There aren't any known significant problems with the gem code as it stands; at this point it's really just about polish and communicating to everyone about the upgrade. We didn't want to introduce a comparatively challenging upgrade (though it's really not that bad) as a point release to the master branch.

--Ethan McCutchen.....2014-02-27 05:25:02 +0000

Would it be easier to blast away the new install and just try the gem one? If you've just installed wagn the old way, is there anything to be aware of in terms of dependencies that are different before starting?

--Lora Friedenthal.....2014-02-27 12:07:04 +0000

If there's no valuable data there, then I would just go for a new install.

 

The dependencies haven't changed much; see the README for installation/upgrade docs.

--Ethan McCutchen.....2014-02-27 15:02:29 +0000

My friend documented his attempt to get an install up and running. http://www.ambienautica.com/wagn_day_1.txt Can you offer any guidance based on where he's gotten?

--Lora Friedenthal.....2014-03-01 21:20:11 +0000

Wow, high marks for documentation!

 

The first major issue is here Part II step 10:

 

10. Created file in /etc/apache2/sites_available with filename www.mysite.blah with the following data:

<VirtualHost *:80>
      ServerName www.mysite.blah
      # !!! Be sure to point DocumentRoot to ‘public’!
      DocumentRoot /var/lib/gems/1.9.1/gems/wagn-1.12.12/public
      <Directory /var/lib/gems/1.9.1/gems/wagn-1.12.12/public>
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
      </Directory>
</VirtualHost>

 

You don't want to point directly to the gem directories, but to your mysite directory (not sure where that was exactly. I like /srv, /home is also common). Note that this means you can actually quite easily run several wagns on the same server.

 

This is admittedly confusing, because you need a "public" directory. As soon as we move a few remaining files into cards (most notably javascript files), the `wagn new mysite` command will create that public directory, and this will be much more obvious. But for now I would recommend adding a symlink from your mysite dir, eg `ln -s /var/lib/gems/1.9.1/gems/wagn-1.12.12/public`. (note that this is a temporary solution, and that you'll need to fix it when you update the wagn gem)

 

I *think* that should be the route to the finish line.

 

The ruby / passenger problems are very familiar (and annoying). I would personally recommend using rvm for managing ruby versions, but your friend has pushed through the ubuntu way. With rvm, the passenger.conf will end up looking something like this:

 

<IfModule mod_passenger.c>
   PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.29
   PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3-p484/ruby
   PassengerMaxPoolSize 40
</IfModule>

One minor note:

 

Part II, #11 is not needed

 

11. Made sure wagn was running with wagn server -d

 

In fact, it will start a "webrick" server, which is a quick and dirty alternative to apache (and other webservers) which by default will run on port 3000. It may be running there still! It's not likely to be a huge problem, but it could be a security issue. I'd recommend killing that process.

 

Once you get things up on apache, I'd also recommend setting up memcache. something like this:

 

1. apt-get install whatever the memcache libs are

2. add 'gem dalli' to Gemfile of mysite

3. run `bundle install` to install it

4. add this to mysite/config/application.rb:

config.cache_store = :dalli_store, []

 

5. restart apache

--Ethan McCutchen.....2014-03-01 21:57:37 +0000

Hope it's ok if I include those docs as text here:

 

INSTALLING WAGN-BEHIND-APACHE FROM A GEM: ATTEMPT 1 (Assume all commands were using sudo unless otherwise noted.) PART I: GETTING WAGN ITSELF UP AND RUNNING 1. On DigitalOcean, created a basic Ubuntu 12.04 x32 server, 512MB RAM, 20GB SSD. 2. Logged in as root, created a user, added user to sudoers, disabled root ssh, logged out. 3. Logged in as user, used apt-get update, apt-get upgrade, and apt-get dist-upgrade. 4. Examined wagn-as-gem documentation here: http://rubydoc.info/gems/wagn/1.12.12/frames 5. Installed mysql 5.5.35 via apt-get install mysql-sever (set root password). 6. Installed ruby 1.9.3p0 via apt-get install ruby1.9.3. 7. Installed bundler 1.5.3 via gem install bundler. 8. Installed ImageMagick 8:6.6.9.7-6ubuntu3.2 via apt-get install imagemagick. 9. Attemtped gem install wagn, received the following error: Building native extensions. This could take a while... ERROR: Error installing wagn: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb creating Makefile make sh: 1: make: not found Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.1 for inspection. Results logged to /var/lib/gems/1.9.1/gems/json-1.8.1/ext/json/ext/generator/gem_make.out 10. Installed build-essential 11.5ubuntu2.1 via apt-get install build-essential 11. Attempted gem install wagn, received the following error: Can't install RMagick 2.13.2. Can't find Magick-config in /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.9.1 Gem files will remain installed in /var/lib/gems/1.9.1/gems/rmagick-2.13.2 for inspection. Results logged to /var/lib/gems/1.9.1/gems/rmagick-2.13.2/ext/RMagick/gem_make.out 11. Installed libmagickcore-dev and libmagickwand-dev via apt-get install libmagickcore-dev libmagicwand-dev 12. Attempted gem install wagn, succeeded. 13. Attmpted wagn new mysite, received the following error: Using macaddr (1.6.5) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb checking for ruby/thread.h... no checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/bin/ruby1.9.1 --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib --with-mygcclib --without-mygcclib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in /var/lib/gems/1.9.1/gems/mysql2-0.3.15 for inspection. Results logged to /var/lib/gems/1.9.1/gems/mysql2-0.3.15/ext/mysql2/gem_make.out An error occurred while installing mysql2 (0.3.15), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.3.15'` succeeds before bundling. 14. Installed mysql-client and libmysqlclient-dev via apt-get install mysql-client libmysqlclient-dev 15. Deleted existing mysite folder. 16. Attempted wagn new mysite, succeeded. 17. Edited mysite/config/database.yml to provide mysql root password set in step 5, in all three blocks. 18. From the mysite folder (docs note -- they tell you explicitly to then "cd mysite", but if you followed the instructions to edit the database file, you're no longer in the parent folder), attempted rake wagn:create, succeeded. 19. Issued wagn server, success! 20. Took server snapshot on digitalocean's dashboard, so I can return to this state later as needed. PART II: GETTING WAGN RUNNING BEHIND APACHE 1. Found these notes here: http://www.two-drifters.com/?p=21 2. Installed apache 2.2.22-1ubuntu1.4 via apt-get install apache2. 3. Tested connection, success. 4. installed passenger and xsendfile modules via apt-get install libapache2-mod-passenger libapache2-mod-xsendfile 5. Noticed that this installed ruby 1.8.7, which appears to now be my default ruby. 6. Used "rm /usr/bin/ruby" and ln -s /usr/bin/ruby1.9.3 /usr/bin/ruby to make ruby1.9.3 the default again. 7. Saw a note about rdoc-data needing to be installed manually on above page, recalled an error about that flying by, installed it via gem install rdoc-data, and rdoc-data --install. 8. Enabled apache modules; a2enmod expires, a2enmod headers, ('xsendfile' on page linked was already enabled) restarted apache with service apache2 restart. 9. Went into mysite folder and issued rake wagn:copy_htaccess 10. Created file in /etc/apache2/sites_available with filename www.mysite.blah with the following data: ServerName www.mysite.blah # !!! Be sure to point DocumentRoot to ‘public’! DocumentRoot /var/lib/gems/1.9.1/gems/wagn-1.12.12/public # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews 11. Made sure wagn was running with wagn server -d 12. Restarted apache with service apache2 restart 13. Got the default site still. 14. Disabled default with a2dissite default. 15. Issued service apache2 reload to activate the new config. 16. Received an internal server error. 17. Tried to check passenger status with passenger-status and received an error: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- phusion_passenger/admin_tools/control_process (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /usr/sbin/passenger-status:27:in ` ' 18. Attempted installing passenger gem with "gem install passenger", gem install, but received an error about the ridocs. 19. Same issue when trying passenger-status. Found this documentation on passenger: http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu 20. Ran passenger-install-apache2-module and received the following failure output: * To install Curl development headers with SSL support: Please run apt-get install libcurl4-openssl-dev or libcurl4-gnutls-dev, whichever you prefer. * To install OpenSSL development headers: Please install it with apt-get install libssl-dev * To install Apache 2 development headers: Please install it with apt-get install apache2-threaded-dev * To install Apache Portable Runtime (APR) development headers: Please install it with apt-get install libapr1-dev * To install Apache Portable Runtime Utility (APU) development headers: Please install it with apt-get install libaprutil1-dev 21. apt-get install libcurl4-openssl-dev (success) 22. apt-get install libssl-dev (already installed?) 23. apt-get install apache2-threaded-dev (success) 24. apt-get install libapr1-dev (already installed?) 25. apt-get install libaprutil1-dev (already installed?) 26. Ran passenger-install-apache2-module again, success, with the following instructions: Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.37 PassengerDefaultRuby /usr/bin/ruby1.8 After you restart Apache, you are ready to deploy any number of web applications on Apache, with a minimum amount of configuration! 27. Disabled passenger module with a2dismod passenger. 28. Stopped apache with service apache2 stop. 29. Edited /etc/apache2/mods-available/passenger.load with the following line: LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-4.0.37/buildout/apache2/mod_passenger.so 30. Edited /etc/apache2/mods-available/passenger.conf with the following: PassengerRoot /var/lib/gems/1.8/gems/passenger-4.0.37 PassengerDefaultRuby /usr/bin/ruby1.8 31. Re-enabled passenger with a2enmod passenger. 32. Re-started apache with service apache2 start. 33. I now receive a phusion passenger page with the following error: no such file to load -- bundler/setup (LoadError) /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require' /var/lib/gems/1.8/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:245:in `run_load_path_setup_code' /var/lib/gems/1.8/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler' /var/lib/gems/1.8/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code' /var/lib/gems/1.8/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:100:in `preload_app' /var/lib/gems/1.8/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:158 Application root /var/lib/gems/1.9.1/gems/wagn-1.12.12 34. Seeing that this can be a Ruby version issue, I stop apache (as above) disable the passenger module (as above), edit passenger.conf file to point at /usr/bin/ruby for the PassengerDefaultRuby , re-enable passenger (as above), start apache back up, and now receive the following error when browsing the site: There was a Errno::ENOENT while loading wagn.gemspec: No such file or directory - git ls-files from /var/lib/gems/1.9.1/gems/wagn-1.12.12/wagn.gemspec:17:in ``' (Bundler::GemspecError) /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:387:in `rescue in eval_gemspec' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:376:in `eval_gemspec' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:347:in `block in load_gemspec_uncached' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/shared_helpers.rb:52:in `chdir' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/shared_helpers.rb:52:in `chdir' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:342:in `load_gemspec_uncached' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:332:in `load_gemspec' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/dsl.rb:51:in `gemspec' /var/lib/gems/1.9.1/gems/wagn-1.12.12/Gemfile:4:in `eval_gemfile' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/dsl.rb:30:in `instance_eval' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/dsl.rb:30:in `eval_gemfile' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/dsl.rb:9:in `evaluate' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/definition.rb:26:in `build' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:152:in `definition' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler.rb:115:in `setup' /var/lib/gems/1.9.1/gems/bundler-1.5.3/lib/bundler/setup.rb:17:in ` ' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:59:in `rescue in require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in `require' /var/lib/gems/1.8/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:245:in `block in run_load_path_setup_code' /var/lib/gems/1.8/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:348:in `running_bundler' /var/lib/gems/1.8/gems/passenger-4.0.37/lib/phusion_passenger/loader_shared_helpers.rb:243:in `run_load_path_setup_code' /var/lib/gems/1.8/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:100:in `preload_app' /var/lib/gems/1.8/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:158:in ` ' /var/lib/gems/1.8/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:29:in ` ' /var/lib/gems/1.8/gems/passenger-4.0.37/helper-scripts/rack-preloader.rb:28:in ` ' Application root /var/lib/gems/1.9.1/gems/wagn-1.12.12 35. This is pretty much where I stop for today because I'm not at all sure what the above means (the file /var/lib/gems/1.9.1/gems/wagn-1.12.12/wagn.gemspec exists), I want to back out and try to avoid getting Ruby 1.8 installed at all, I think manually installing phusion passenger might work better, and I have other stuff I have to attend to.

 

--Ethan McCutchen.....2014-03-01 22:01:27 +0000

He says: Without setting up memcache, it does get me a wagn page (it redirects to admin/setup as a URL), but it's just the "Wagn Hitch :(" page, and all it says is "Server Error. Yuck, sorry about that.". If I do enable memcache, I get the setup page, but very barebones as if no styles have been applied. I'll attach a screenshot.

 

I may go through with starting over from the beginning of PART II anyway, just because of the Ruby version mess.

--Lora Friedenthal.....2014-03-02 16:00:54 +0000

Redid the install without conflicting rubies, but still stuck at the same part, with a site that doesn't look like it's loading everything. Here's today's documentation. http://www.ambienautica.com/wagn_day_2.txt

--Lora Friedenthal.....2014-03-02 17:13:33 +0000

https://dl.dropboxusercontent.com/u/6301279/wagnsshot.jpg

--Lora Friedenthal.....2014-03-02 17:14:31 +0000

It was a permissions thing. "I just had to set ownership of the whole wagn folder to the apache user and group (www-data)."

--Lora Friedenthal.....2014-03-02 17:58:23 +0000

right. technically I think only config.ru and the files, log, and tmp directories need to be owned (or at least writeable) by www.data. I generally try not to make too many of the other files writable for security reasons, but to be honest you'd really have to have other configuration problems for this to really become an issue.

--Ethan McCutchen.....2014-03-02 18:35:58 +0000