omega4, drush, ruby, rvm, et al

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
fchandler's picture

Ubuntu 14.04 LTS desktop
PHP Version 5.5.9-1ubuntu4.4
Apache/2.4.7 (Ubuntu)
MYSQL 5.5.38
cURL Information 7.35.0

I have been trying to get Omega 4, and the preferred environment, loaded on my new machine. The process has changed since the last time I did this, and I am having issues in getting the environment installed and working. Not realizing Ubuntu comes with drush 5.10.0, I installed composer and drush 7dev. That was a bit of a trick, but it seems to be working. I then installed Omega 4 and made a subtheme. I navigated to the subtheme folder, installed rvm 1.25.31 and tried to install compass, but had permission error. I then tried to install bundler, had permission issues, and tried again with sudo. Bundler-1.7.3 installed successfully. I then tried to run bundle install and got this error:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire' from extconf.rb:2:in `'

Gem files will remain installed in /var/lib/gems/1.9.1/gems/hitimes-1.2.2 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/hitimes-1.2.2/ext/hitimes/c/gem_make.out
An error occurred while installing hitimes (1.2.2), and Bundler cannot continue.
Make sure that gem install hitimes -v '1.2.2' succeeds before bundling.

Now I am stuck there. I can't get hitimes 1.2.2 installed.

So now all the questions:
What did I do wrong? How do I fix it? Did I not do things in the right order? How does one uninstall any of it, if necessary? Do I need hitimes?

I really am not that comfortable with the backend, but I can usually get things done, but now I am stumped.

Comments

rvm?

Screenack's picture

Frank,

Please run "rvm list" and report what is output. FWIW, I'm using ruby 1.9.3-p547 and I can run 'bundle install' on a fresh omega subtheme without an issue.

rvm list & gems enviroment

fchandler's picture

:in sub-theme folder$ rvm list
rvm rubies
=> ruby-1.9.3-p547 [ x86_64 ]
* ruby-2.1.3 [ x86_64 ]

=> - current

=* - current && default

* - default

francis@francis-ThinkPad-W530:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.23
- RUBY VERSION: 1.9.3 (2013-11-22 patchlevel 484) [x86_64-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/1.9.1
- /home/francis/.gem/ruby/1.9.1
- /usr/share/rubygems-integration/1.9.1
- /usr/share/rubygems-integration/all
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/

tried again

fchandler's picture

I set up a new site, installed Omega, created a new sub-theme, and got the same error when trying to set up the environment - can't install hitimes-1.2.2. The folder /var/lib/gems/1.9.1/gems/hitimes-1.2.2 has owner and group as root. The other folders in /var/lib/gems/1.9.1/gems have root as me and group as www-data. The other folders are addressable-2.3.6, breakpoint-2.5.0, bundler-1.7.3, sass-3.4.5, and sassy-maps-0.4.0. Could the permissions on that folder be causing the issue? I am going to change permissions and try again, but that will be later today.

nope

fchandler's picture

I changed permissions, same error.

I doubt its permissions

Screenack's picture

We need to get your RVM correct. I have had similar errors and invariably is related to my ruby/rvm environment. Give this page a look: http://stackoverflow.com/questions/7905114/rails-bundle-clean and PM me on the IRC #drupal-support so we can hash through this.

solution

fchandler's picture

Can't say thank you enough to Kyle Skrinak.
I evidently have three versions of ruby on my machine; 1.9.1, 1.9.3p547, and 2.1.3. The real issue was not running commands in shell, such that rvm was not running as a function. I changed settings of the terminal window. From the menu, choose edit/preferences, under the "Title and Command" tab, click the radio button beside "Run command as shell". Here is where I found this info:

Integrating RVM with gnome-terminal

After doing that, all the gems installed. Like I said earlier, I am not that good on the backend, but I guess I am getting there.

Again, thank you Kyle.

My pleasure!

Screenack's picture

I'd love for Frank to think I was selflessly motivated but I've been frustrated by the lack of clarity on starting up an omega subtheme on a clean Ubuntu system. I've seen the issue Frank tripped up on, but that's a scenario I'm not likely to come across, given how I ssh into my environments.

That said, I just did a clean RVM installation on Ubuntu 14.04 and here's the steps to enable a full omega subtheme environment. Just two commands, but they take a little while to run.

cd to your omega subhtheme
rvm install ruby-1.9.3-p547
bundle install

Works great!

drush omega-guard

fchandler's picture

It did not stop there, unfortunately. RVM and the gems loaded correctly. However, when I tried to run drush omega-guard. I got these errors.
error sass/seabreeze.no-query.scss (Line 3 of sass/seabreeze.styles.scss: File to import not found or unreadable: breakpoint.
Load paths:
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/sass
Compass::SpriteImporter
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/sass
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-core-1.0.1/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/susy-2.1.3/sass
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-normalize-1.5/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-rgbapng-0.2.1/lib/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/toolkit-2.6.0/stylesheets
Sass::Globbing::Importer)
error sass/seabreeze.normalize.scss (Line 8: File to import not found or unreadable: toolkit/border-box.
Load paths:
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/sass
Compass::SpriteImporter
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/sass
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-core-1.0.1/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/susy-2.1.3/sass
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-normalize-1.5/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-rgbapng-0.2.1/lib/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/toolkit-2.6.0/stylesheets
Sass::Globbing::Importer)
error sass/seabreeze.styles.scss (Line 3: File to import not found or unreadable: breakpoint.
Load paths:
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/sass
Compass::SpriteImporter
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/sass
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-core-1.0.1/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/susy-2.1.3/sass
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-normalize-1.5/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/compass-rgbapng-0.2.1/lib/stylesheets
/var/www/html/ncseabreeze/sites/all/themes/seabreeze/vendor/bundle/ruby/1.9.1/gems/toolkit-2.6.0/stylesheets
Sass::Globbing::Importer)
Compilation failed in 3 files.

Found the solution here:
https://www.drupal.org/node/2323235#comment-9069731
In my case:
Changed line 5 in seabreeze.style.scss from @import "toolkit-no-css"; to @import "toolkit";
Changed line 8 in seabreeze.normalize.scss from @import "toolkit/border-box"; to @import "toolkit";
I also added these lines to my sub-theme config.rb file;
require 'breakpoint'
require 'singularitygs'
I quit guard and cleared drush caches, then reloaded drush omega-guard. All loaded correctly w/o errors.

Your mileage may vary

karolus's picture

I've been working with Omega 4.x themes for a few years, and uncovered a similar issue when updating an older project.

It seems updating RVM and Mac OS X made some required elements no longer be compatible. One of them was nio4r. Even though bundler would be giving a notice, I couldn't update via the CLI, since the update wouldn't take. To fix it, I went into Gemfile.lock, and changed line 62 from:

nio4r (1.0.0)

to

nio4r (1.1.1)

After this:
$ gem install bundler
$ bundle install
$ drush omega-guard

And all was OK.

As a final note, though--when I updated RVM, the build of 1.9.3 is p551, not the older p547. Regardless, things ran fine.

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week