Fejlesztőkörnyezet telepítése
Closed this issue · 51 comments
Próbáltam a leírtak szerint összehozni egy fejlesztőkörnyezetet többszöri nekifutással a gépemen de az eredmény az hogy ezt kapom…
Homestead.yaml módosítottam máshoz nem is nagyon kellet nyúlni, ssh működik a virtuális gépre (Virtualbox) be tudok jelentkezni de dev oldal mégsem jön be a fönti hibát kapom.
/bootstrap/../vendor/autoload.php útvonal válóban nem létezik de bárhogy próbáltam módosítani rendre egyere több hibát kapok...
Van valami ötletetek mi lehet nálam a gond?
Homestead.yaml tartalma:
ip: "172.16.15.17"
#ip: "127.0.0.1"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:/Users/rg/.ssh/id_rsa.pub
keys:
- C:/Users/rg/.ssh/id_rsa
folders:
- map: C:\xampp\htdocs
to: /home/vagrant/Code
sites:
- map: dev.szentiras.hu
to: /home/vagrant/Code/szentiras.hu/public
databases:
- szentiras
a composer install megvolt?
Windows alatt igen...
Úgy értem ki kell adni a php composer.phar install parancsot a vagranton
Ok ezt kiadtam a /Code/szentiras.hu/php composer.phar install miután lefutott ezt kapom
Whoops, looks like something went wrong. webes feületen
ilyenkor a logból már kiderül, hogy mi a gond (storage/logs)
igen ez van benne:
http://dev.macak.hu/wp-content/files/laravel.log
vagyis
No supported encrypter found. The cipher and / or key length are invalid. in /home/vagrant/Code/szentiras.hu/bootstrap/cache/compiled.php
php artisan key:generate
php artisan clear-compiled
esetleg segít ezen?
Sajnos ezzel is maradt, ugyan az a helyzet...
A .env fájlodban lehet hogy ki kell törölni a szóközöket ebből a sorból:
ENABLED_TRANSLATIONS=1,2,3,4,5
Ha a vagranton kiadod a ./install.sh parancsot mi történik?
Bár én úgy látom, hogy létre se jöttek az alap táblák, amiket az after.sh script hoz létre elvileg a provision után.
Itt a fájlok jogaival is gond van...
vagrant@homestead:/Code/szentiras.hu$ ls -la/Code/szentiras.hu$ ./install.sh
total 1355
drwxrwxrwx 1 vagrant vagrant 8192 Feb 23 21:13 .
drwxrwxrwx 1 vagrant vagrant 8192 Feb 24 02:03 ..
-rwxrwxrwx 1 vagrant vagrant 1176 Feb 23 08:58 after.sh
drwxrwxrwx 1 vagrant vagrant 4096 Feb 23 08:58 app
-rwxrwxrwx 1 vagrant vagrant 1697 Feb 23 08:58 artisan
drwxrwxrwx 1 vagrant vagrant 0 Feb 23 08:58 bootstrap
-rwxrwxrwx 1 vagrant vagrant 1983 Feb 23 08:58 composer.json
-rwxrwxrwx 1 vagrant vagrant 166453 Feb 23 08:58 composer.lock
-rwxrwxrwx 1 vagrant vagrant 1146843 Feb 23 08:58 composer.phar
drwxrwxrwx 1 vagrant vagrant 4096 Feb 23 08:58 config
drwxrwxrwx 1 vagrant vagrant 4096 Feb 23 08:58 database
drwxrwxrwx 1 vagrant vagrant 4096 Feb 23 08:58 deploy
-rwxrwxrwx 1 vagrant vagrant 661 Feb 24 10:33 .env
-rwxrwxrwx 1 vagrant vagrant 646 Feb 23 08:58 .env másolata.example
drwxrwxrwx 1 vagrant vagrant 4096 Feb 23 08:58 .git
-rwxrwxrwx 1 vagrant vagrant 64 Feb 23 08:58 .gitattributes
-rwxrwxrwx 1 vagrant vagrant 225 Feb 23 08:58 .gitignore
-rwxrwxrwx 1 vagrant vagrant 1845 Feb 23 08:58 gulpfile.js
-rwxrwxrwx 1 vagrant vagrant 164 Feb 23 08:58 install.sh
-rwxrwxrwx 1 vagrant vagrant 512 Feb 23 08:58 package.json
-rwxrwxrwx 1 vagrant vagrant 107 Feb 23 08:58 phpspec.yml
-rwxrwxrwx 1 vagrant vagrant 1262 Feb 23 08:58 phpunit.xml
drwxrwxrwx 1 vagrant vagrant 0 Feb 23 08:58 prototypes
drwxrwxrwx 1 vagrant vagrant 4096 Feb 23 08:58 public
-rwxrwxrwx 1 vagrant vagrant 3791 Feb 23 08:58 README.md
drwxrwxrwx 1 vagrant vagrant 0 Feb 23 08:58 resources
-rwxrwxrwx 1 vagrant vagrant 588 Feb 23 08:58 server.php
drwxrwxrwx 1 vagrant vagrant 0 Feb 23 08:58 storage
drwxrwxrwx 1 vagrant vagrant 0 Feb 23 08:58 tests
drwxrwxrwx 1 vagrant vagrant 0 Feb 23 08:58 tmp
-rwxrwxrwx 1 vagrant vagrant 5485 Feb 23 08:58 .travis.yml
drwxrwxrwx 1 vagrant vagrant 8192 Feb 23 15:00 vendor
vagrant@homestead:
-bash: ./install.sh: /bin/sh^M: bad interpreter: No such file or directory
vagrant@homestead:~/Code/szentiras.hu$
a jog szerintem nem gond. Próbáld úgy futtatni, hogy
sh install.sh
Ezt a kimenetet kapom:
vagrant@homestead:~/Code/szentiras.hu$ sh install.sh
Usage: npm
where is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
help, help-search, i, init, install, install-test, it, link,
list, ln, login, logout, ls, outdated, owner, pack, ping,
prefix, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, tag, team, test, tst, un, uninstall,
unpublish, unstar, up, update, v, version, view, whoami
npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview
Specify configs in the ini-formatted file:
/home/vagrant/.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config
npm@3.10.10 /usr/lib/node_modules/npm
[Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
Did you mean this?
install
[Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
Did you mean one of these?
migrate
migrate:install
migrate:rollback
migrate:reset
migrate:refresh
migrate:status
: not found 5: install.sh: node_modules/gulp/bin/gulp.js
[Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
Did you mean one of these?
cache:clear
debugbar:clear
config:clear
route:clear
view:clear
twig:clean
cache:table
[InvalidArgumentException]
Cannot instantiate Twig extension 'TwigBridge\Extension\Laravel\String': Class TwigBridge\Extension\Laravel\String
does not exist
vagrant@homestead:~/Code/szentiras.hu$
Érdekes, hogy az after.sh -ban az útvonal valami ilyesmi:
/home/vagrant/szentiras-hu/tmp/database.sql
de válóban így érhető el a db file
/home/vagrant/Code/szentiras.hu/tmp/database.sql
Ezzel jött le így:
git clone https://github.com/borazslo/szentiras.hu.git
ez simán lefutott így:
vagrant@homestead:
$ mysql -u homestead < /home/vagrant/Code/szentiras.hu/tmp/database.sql$
vagrant@homestead:
A fönti webes hibba még mindíg fennál...
illetve valami azért mégis csak van az adatbázisból...
mysql> select * from kar_translations where id = 1;
+----+---------------------+---------------------+---------------------------------+--------+-----------+-------
| id | created_at | updated_at | name | abbrev | denom | lang | copyright | publisher | publisher_url | reference |
+----+---------------------+---------------------+---------------------------------+--------+-----------+-------
| 1 | 2014-08-01 11:19:30 | 2014-08-01 11:19:30 | Szent István Társulati Biblia | SZIT | katolikus | magyar | A Szent István Társulat SzentÃrás-Bizottságának fordÃtása, új bevezetÅkkel és magyarázatokkal; sajtó alá rendezte Rózsa Huba. Használatának engedélye megújÃtva: 2013. április. | Szent István Társulat | http://szit.katolikus.hu | BIBLIA ószövetségi és újszövetségi SzentÃrás; Ford. Gál Ferenc, Gál József, Gyürki László, Kosztolányi István, Rosta Ferenc, Szénási Sándor, Tarjányi Béla; Szent István Társulat; Budapest; 2009; 3. kiadás. |
+----+---------------------+---------------------+---------------------------------+--------+-----------+-------
1 row in set (0.00 sec)
mysql>
Igen, a Homestead fájlodban nem jók a mappingek.
A scriptek arra számítanak, hogy "/home/vagrant/szentiras-hu"-ban vannak a fájlok
Ezért nekem így néz ki Homesteadben:
folders:
- map: "C:/prog/www/szentiras.hu"
to: "/home/vagrant/szentiras-hu"
Gondolm akkor ez a sites rész meg így:
sites:
- map: dev.szentiras.hu
to: /home/vagrant/szentiras-hu/public
most ez a hibaüzenet...
QueryException in Connection.php line 729: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order' in 'order clause' (SQL: select * from kar_translations
where denom
= katolikus and id
in (1, 2, 3, 4, 5) order by denom
asc, order
asc, name
asc)
az order column tényleg nincs a kar_translations táblában az sql fájlban... tehát nem kerul be az adatbázisba és ezért nem is tud rendezni aszerint
CREATE TABLE kar_translations
(
id
int(10) unsigned NOT NULL AUTO_INCREMENT,
created_at
timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
updated_at
timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
name
varchar(100) COLLATE utf8_unicode_ci NOT NULL,
abbrev
varchar(10) COLLATE utf8_unicode_ci NOT NULL,
denom
varchar(20) COLLATE utf8_unicode_ci NOT NULL,
lang
varchar(10) COLLATE utf8_unicode_ci NOT NULL,
copyright
longtext COLLATE utf8_unicode_ci NOT NULL,
publisher
varchar(200) COLLATE utf8_unicode_ci NOT NULL,
publisher_url
varchar(200) COLLATE utf8_unicode_ci NOT NULL,
reference
varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
Az install.sh továbbra se futott le, pedig az csinál meg egy csomó mindent. Ez gyanús nekem: : bin/sh^M Az a ^M vajon mit keres ott...
valóban nem fut le...
így most is ezt kapom:
vagrant@homestead:~/szentiras-hu$ ./install.sh
-bash: ./install.sh: /bin/sh^M: bad interpreter: No such file or directory
a fájlban nincs ez ^M ben ezt e terminal teszi hozzá
viszon ez ilyesmit ír ki:
vagrant@homestead:~/szentiras-hu$ sh install.sh
Usage: npm
where is one of:
access, adduser, bin, bugs, c, cache, completion, config,
ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
help, help-search, i, init, install, install-test, it, link,
list, ln, login, logout, ls, outdated, owner, pack, ping,
prefix, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, tag, team, test, tst, un, uninstall,
unpublish, unstar, up, update, v, version, view, whoami
npm -h quick help on
npm -l display full usage info
npm help search for help on
npm help npm involved overview
Specify configs in the ini-formatted file:
/home/vagrant/.npmrc
or on the command line via: npm --key value
Config info can be viewed via: npm help config
npm@3.10.10 /usr/lib/node_modules/npm
[Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
Did you mean this?
install
[Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
Did you mean one of these?
migrate
migrate:install
migrate:rollback
migrate:reset
migrate:refresh
migrate:status
: not found 5: install.sh: node_modules/gulp/bin/gulp.js
[Symfony\Component\Console\Exception\CommandNotFoundException]
" is not defined.
Did you mean one of these?
cache:clear
debugbar:clear
config:clear
route:clear
view:clear
twig:clean
cache:table
[InvalidArgumentException]
Cannot instantiate Twig extension 'TwigBridge\Extension\Laravel\String': Class TwigBridge\Extension\Laravel\String does not exist
a forráskódot hogy szedted le?
Olyan, mintha hibás lenne az install.sh fájl. Meg az after.sh - annak kellett volna sokmindent megcsinálnia.
Egyébként ha soronként lefuttatnád, ami benne van, az talán segítene.
Ezzel jött le így:
git clone https://github.com/borazslo/szentiras.hu.git
az elsőre ez jött:
vagrant@homestead:~/szentiras-hu$ npm --no-bin-link install
npm WARN deprecated gulp-minify-css@1.2.4: Please use gulp-clean-css
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated node-uuid@1.4.7: use uuid module instead
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm ERR! Linux 4.4.0-51-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "--no-bin-link" "install"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! Maximum call stack size exceeded
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/szentiras-hu/npm-debug.log
a 4. parancsra ez jött:
vagrant@homestead:~/szentiras-hu$ node_modules/gulp/bin/gulp.js
[20:30:58] Using gulpfile ~/szentiras-hu/gulpfile.js
[20:30:58] Starting 'default'...
[20:30:58] Starting 'sass'...
[20:30:58] 'sass' errored after 167 ms
[20:30:58] Error: ENOENT: no such file or directory, scandir '/home/vagrant/szentiras-hu/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:951:18)
at Object.getInstalledBinaries (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/extensions.js:121:13)
at foundBinariesList (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
[20:30:58] Error in plugin 'run-sequence(sass)'
Message:
ENOENT: no such file or directory, scandir '/home/vagrant/szentiras-hu/node_modules/node-sass/vendor'
Details:
errno: -2
code: ENOENT
syscall: scandir
path: /home/vagrant/szentiras-hu/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/szentiras-hu/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:951:18)
at Object.getInstalledBinaries (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/extensions.js:121:13)
at foundBinariesList (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
[20:30:58] Finished 'default' after 180 ms
az utoltóra ez:
vagrant@homestead:~/szentiras-hu$ php artisan twig:clean
[InvalidArgumentException]
Cannot instantiate Twig extension 'TwigBridge\Extension\Laravel\String': Class TwigBridge\Extension\Laravel\String does not exist
A 4. az 1. miatt van. Sajnos végig kéne néznem 0-ról a telepítései útmutatót, erre most egyelőre nem lesz időm.
én azért megpróbálom összerakni 0 -ről telepítést a fönti ismeretek alapján hátha kiderül, hol rontom el...
Az is lehet, hogy olyan módon változott meg a homestead, hogy nem működnek dolgok. De ha nem megy, akkor is el lehet lenni, ha összerak az ember magának egy Mysql+PHP-t (legfeljebb pár funkció nem megy vagy macerás)
OK próbálkozom... de ha eszedbe jut még valami akkor azt is megköszönöm....
Köszönöm, hogy időt szántál rám én sokat tanultam...
Elkezdtem én is összerakni megint. A vagrantra belépve a dos2unix install.sh parancs sokat segít. Akkor már az install.sh lefut elvileg.
Ja, meg előtte egy sudo after.sh (abba is lehet, h bele kell nyúlni, attól függően, hogy hova lett mappelve a szentiras.hu mappa)
Illetve az after-ben benne van az install.
Szóval igazából azt kéne valahogy leírni a dokumentációba, hogy ha megvan a homestead installálás, akkor hogyan kell az after.sh-t rávenni, hogy fusson le pontosan 1-szer, amikor a vagrant gép provisionje megy.
Akkor most a legfrissebb vagrantra környezettel teszteled tehát 16.04 ubuntu és a rajta lévő 7.x PHP
Mert akkor én is újra megpróbálom összerakni...
a v5.0.1 homesteaddel próbáltam. még nem teljesen jó, nem működik minden.
Nálam a sudo after.sh mannuálisan sem fut le...
vagrant@homestead:/szentiras-hu$ sudo after.sh/szentiras-hu$ sh after.sh
sudo: after.sh: command not found
vagrant@homestead:
: Permission deniedsh:
: Permission deniedsh:
: Permission deniedsh:
after.sh: 37: after.sh: Syntax error: end of file unexpected (expecting "then")
vagrant@homestead:~/szentiras-hu$ sudo sh after.sh
: not found: after.sh:
: not found: after.sh:
: not found: after.sh:
after.sh: 37: after.sh: Syntax error: end of file unexpected (expecting "then")
sudo ./after.sh, bocsi
Jah erre meg dob egy ilyet...
vagrant@homestead:~/szentiras-hu$ sudo ./after.sh
/usr/bin/env: âbash\râ: No such file or directory
itt is segített a dos2unix after.sh így elindult a telepítés
sudo sh after.sh parancs után...
Most itt hasalt el a dolog...
./install.sh: 5: ./install.sh: node_modules/gulp/bin/gulp.js: not found
és
[InvalidArgumentException]
Cannot instantiate Twig extension 'TwigBridge\Extension\Laravel\String': Class Tw
igBridge\Extension\Laravel\String does not exist
az after.sh
pedig a texlive csomagoknál problémázott
pl. sorra nem konfigurálta csomagokat Package tex-common is not configured yet.
Szuper, én is pont itt tartok :)
Ezt találtam...
rcrowe/TwigBridge@2d57cd6
a szentiras.hu -n melyik php -v fut jelenleg?
5.6
viszont az 5-ös homestead gondolom 7-es php-n van, és akkor most egy csomó mindent kéne frissíteni :)
Fölraktam ez alapján: https://laracasts.com/discuss/channels/servers/how-do-i-setup-2-homestead-boxes-one-with-php-56-and-one-with-php-7
egy php 5.6 ost 14.04 -el
ezt írja sh instal.sh -ra
Generating optimized class loader
[PDOException]
SQLSTATE[HY000] [1862] Your password has expired. To log in you must change it using a client t
hat supports expired passwords.
illetve a webes feületen is ugyan ez...
az sh after.sh látszólag nagyobb hibák nélkül lefutott...
ja a jelszó problémát ezzel megoldottam:
vagrant ssh
mysql -u homestead -p
Type in the existing password (secret)
SET password=PASSWORD("secret");
most ez van:
SQLSTATE[HY000] [1049] Unknown database 'bible'
miért nem jött létre?
az sh instal.sh még van ilyen rondaság
at Object.Module._extensions..js (module.js:432:10)
[12:49:22] Error in plugin 'run-sequence(sass)'
Message:
ENOENT: no such file or directory, scandir '/home/vagrant/szentiras-hu/node_modules/node-sass/vendor'
Details:
errno: -2
code: ENOENT
syscall: scandir
path: /home/vagrant/szentiras-hu/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/szentiras-hu/node_modules/node-sass/vendor'
at Error (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.getInstalledBinaries (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/extensions.js:121:13)
at foundBinariesList (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:20:15)
at foundBinaries (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:15:5)
at Object.module.exports.missingBinary (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/errors.js:45:5)
at module.exports (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/binding.js:15:30)
at Object. (/home/vagrant/szentiras-hu/node_modules/node-sass/lib/index.js:14:35)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
[12:49:22] Finished 'default' after 109 ms
illetve az sh after.sh van ilyen hibaüzenet:
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://repo.mysql.com trusty InRelease: The following signatures were invalid: KEYEXPIRED 1487236823 KEYEXPIRED 1487236823 KEYEXPIRED 1487236823
W: Failed to fetch http://repo.mysql.com/apt/ubuntu/dists/trusty/InRelease
másodszor is futtattam az sh after.sh -t
most úgy tűnik a mysql create lefutott és elindult db szerver mert most már ezt írja ki a webes feület:
ErrorException in layout.twig line 23:
An exception has been thrown during the rendering of a template ("file_get_contents(/home/vagrant/szentiras-hu/public/build/rev-manifest.json): failed to open stream: No such file or directory") in "layout" at line 23.
Tegnap megcsináltam 0-ról a telepítést 2 gépen is, elvileg most már nagyjából pontos a wiki is és az install.sh meg after.sh script is.