Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for using composer #900

Closed
yazzou opened this issue Apr 8, 2016 · 5 comments
Closed

Workaround for using composer #900

yazzou opened this issue Apr 8, 2016 · 5 comments

Comments

@yazzou
Copy link

yazzou commented Apr 8, 2016

I am struggling to unable simple AMP module on a drupal site hosted on Octopus platform for 2 days now :(. I am trying to follow the installation instructions :
http://cgit.drupalcode.org/amp/tree/README.md?h=7.x-1.x

and i am stuck at the point :

If you don't see any dependencies download, try drush composer-json-rebuild followed by drush composer-manager install when in docroot

I do have the following error :

octopususer.ftp:[www.mysite.com]$ drush composer-manager install
Download and install the Drush Composer extension? (y/n): y
Directory /home/octopususer.ftp/.drush exists, but is not writable. Please check directory permissions.                                 [error]
Project composer (8.x-1.x-dev) could not be downloaded to /home/octopususer.ftp/.drush/composer.                                        [error]
The drush command 'composer' could not be found.                                                                                       [error]
exception 'RuntimeException' with message 'Autoloader not found: /data/disk/octopususer/distro/006/drupal-7.43.1-prod/sites/www.mysite.com/vendor/autoload.php' in      [error]
/data/disk/octopususer/distro/006/drupal-7.43.1-prod/sites/www.mysite.com/modules/composer_manager/composer_manager.module:173
Stack trace:
#0 /data/disk/octopususer/distro/006/drupal-7.43.1-prod/sites/www.mysite.com/modules/composer_manager/composer_manager.drush.inc(162): composer_manager_register_autoloader()
#1 /data/disk/octopususer/distro/006/drupal-7.43.1-prod/sites/www.mysite.com/modules/composer_manager/composer_manager.drush.inc(101): drush_composer_manager_update_autoloader()
#2 [internal function]: drush_composer_manager('install')
#3 /opt/tools/drush/7/drush/includes/command.inc(368): call_user_func_array('drush_composer_...', Array)
#4 /opt/tools/drush/7/drush/includes/command.inc(219): _drush_invoke_hooks(Array, Array)
#5 [internal function]: drush_command('install')
#6 /opt/tools/drush/7/drush/includes/command.inc(187): call_user_func_array('drush_command', Array)
#7 /opt/tools/drush/7/drush/lib/Drush/Boot/BaseBoot.php(62): drush_dispatch(Array)
#8 /opt/tools/drush/7/drush/drush.php(70): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#9 /opt/tools/drush/7/drush/drush.php(11): drush_main()
#10 {main}

Here is what i have on drupal admin
http://snag.gy/aZ7Yc.jpg

I understand that it is due to security reason
as mentionned here : #677

Can you please provide a workaround to allow me to install AMP module ? I have thought of manually creating composer directory and download the files into it
I am not sure that it is the way to do it and i do not want to break anything on the plateform.

@yazzou
Copy link
Author

yazzou commented Apr 8, 2016

Ok i have finally the solution. I went to /files/composer and taped "composer update"
Thanks for taking time to read and sorry for any inconvenience

@yazzou yazzou closed this as completed Apr 8, 2016
@kopeboy
Copy link

kopeboy commented Aug 5, 2016

Can you remind how to get to the single site /files/composer from the terminal?

I was trying to install SendGrid_integration module and I couldn't cause of composer-manager dependency.

@omega8cc
Copy link
Owner

omega8cc commented Aug 5, 2016

@kopeboy

To display drupal root: drush @foo.com dd

Or, to go to the site's directory directly: cd ~/clients/yourclient/sitename

Please note that BOA forces this:

$conf['composer_manager_vendor_dir'] = 'sites/' . $_SERVER['SERVER_NAME'] . '/vendor';
// Support for composer_manager

@kopeboy
Copy link

kopeboy commented Aug 5, 2016

Yeah I was stupidly placing a / before platforms/xxx/xxxxxx/sites/mysite/files/composer

Apparently I could fix composer-manager just by running composer update once there like yazzou said.
It installed the required libraries (components?) for the Sendgrid_integration module.

...And, I have no idea what
$conf['composer_manager_vendor_dir'] = 'sites/' . $_SERVER['SERVER_NAME'] . '/vendor'; // Support for composer_manager
implies, and what should I do about it?

@omega8cc
Copy link
Owner

omega8cc commented Aug 5, 2016

See: #385

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants