Showing posts with label new. Show all posts
Showing posts with label new. Show all posts

Monday, February 11, 2013

Welcome Aboard

In response to a recent inquiry on the cygwin list, I now have Ruby on Rails working out of the box on Cygwin, and have just uploaded the necessary packages to the Ports repository. To assure proper operation, the newly updated Ruby 1.9.3-p385-2 release is required.
To get aboard with Rails, install the ruby-rails package and its dependencies, then:
$ rails new testapp1 --skip-bundle
(files are installed)
$ cd testapp1
$ bundle install --local
(this will show that existing gems are being used)
$ rails server
(then point browser to http://localhost:3000/,
OR:)
$ unicorn_rails
(then point browser to http://localhost:8080/)
From there on out, you're on your own. Enjoy the ride!
UPDATE: Well, that didn't take long. A security advisory was issued yesterday for Rails, so I have updated the Rails packages to 3.2.12 accordingly. The supported method for updating Rails apps for newer Rails versions is as follows:
  1. Open Gemfile in a text editor and update the version number following the gem 'rails' directive.
  2. Run bundle update --local to update the Gemfile.lock file. Existing gems should be found and used.
  3. Run rake rails:update to update configuration files, using the 'd' option to verify changes first.
More details on this procedure are available on RailsApps.

Wednesday, June 17, 2009

The Path of Evolution

GNOME Evolution, that is. This is one of those packages that has been bugging me for years; it would build but not run. But in the process of buildings Contacts, Dates, and Tasks, which also use Evolution-Data-Server but have very simple interfaces, I discovered that NSS still wasn't working, causing E-D-S to not initialize. So I rebuilt E-D-S and Evolution without NSS, and voila, it runs like a charm.

So Evolution will be part of the next upload, albeit without SSL support, together with the rest of GNOME 2.26.2. As for SSL support, as much as I would like to have it, I'll admit trying to fix NSPR/NSS again isn't my highest priority right now. (Why can't they use something more normal, like GnuTLS, instead?) As always, PTC.

Thursday, October 11, 2007

PHP on Cygwin

Efforts to bring PHP to Cygwin have waxed and waned over the years. One of the big problems, at least with PHP5, was dealing with shared extensions, as discussed last year in this thread. Unfortunately the sources mentioned there are no longer available, so unfortunately I didn't even have that to start with.

PHP consists of multiple interpreters (called SAPIs) which serve different purposes, e.g. a command-line interface, a CGI interface, Apache modules, etc., together with dozens of extensions written in C, which can either be built in to the interpreter or can exist as loadable modules. Additional C extensions are also available on PECL, which must be built as shared modules, as they are installed after building the runtime.

PHP extensions require symbols that would normally be (on Linux) in the interpreters, but that doesn't work for Cygwin because all symbols must be resolved at link time. But if an extension is linked against one SAPI but loaded by another, a segfault will result.

The solution is, as is done with MSVC, is to build almost all the core sources into a shared library, then link the SAPIs (with just their SAPI-specific code) and the extensions against the library. Implementing this within the autotool framework took a lot of work to get right, but it looks promising so far: both the CLI and CGI load all the modules, PECL extensions can be built, and even better, PHP-GTK is working.

This solution does require a few minor changes to the build procedure for PECL extensions, hence I've added php.cygclass to cygport for this purpose; in most cases, a one-liner 'inherit php' is enough.

PHP, PHP-GTK, and several other sample PECL extensions are now in CVS; the PHP .cygport is heavily commented, which should help make sense of what was needed to make this work, for those who are interested. PHP, with separate packages for each of the standard extensions, as well as PHP-GTK, will be available in binary form with the next upload.

BTW, at this point I have no intention of packaging PEAR (pure PHP extension) libraries, as they require no compilation; instead, just install php-pear and install them as on any other platform.

If anyone is running Apache, then I would like to hear if those SAPIs are working; please post a comment below or to the mailing list.

Enjoy!