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

Improve Setup Script #1709

Open
psinghal20 opened this issue Feb 15, 2018 · 97 comments
Open

Improve Setup Script #1709

psinghal20 opened this issue Feb 15, 2018 · 97 comments

Comments

@psinghal20
Copy link
Contributor

For those who faced issues with using the setup scripts, Please comment below with the errors you faced and the logs for your installation. You can find the logs in setup directory.

@vzhz
Copy link
Contributor

vzhz commented Feb 19, 2018

I run macOS High Sierra and when I ran python setup.py from the root directory, I was referred to the manual setup process.
I am happy to attempt this setup again as a test as work on this continues.
Here is my complete log:
Admins-MacBook-Air:WikiEduDashboard Admin$ python setup.py WARNING! This is a work in progress script. It has been tested to work for debian-based systems. There are individual operating system dependent scripts being called from this one. You can find them in setup directory. The scripts for windows and OSX are still not complete. You can use them as a starting point or as a reference. If you run into any errors while running this script, please comment with your issue on https://github.com/WikiEducationFoundation/WikiEduDashboard/issues/1709 Please upload your logs for installation with your issue reports. The logs can be found in the setup directory. If you can help improve this script, We would love your contributions. Please install ruby-2.5.0 before running this script. Sorry! Your operating is not supported by this script. Please refer https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/ docs/setup.md for manual setup instructions.

@ragesoss
Copy link
Member

ragesoss commented Mar 5, 2018

The message for when ruby 2.5 is not available should just say to install it, without insisting on a specific method. It can link to https://rvm.io/ as one option for doing so, but without any more specific instructions than that.

The exact instructions in the current script didn't work for me on a Mac, but other instructions from the RVM website did.

@jeffblack360
Copy link

jeffblack360 commented Oct 6, 2018

The setup/deb-setup.sh complains if it doesn't find ruby 2.5.0 installed. I have ruby 2.5.1: should the script merely check for a match on 2.5 vs. 2.5.0?

I changed the script to complete setup.

@arcayn
Copy link
Contributor

arcayn commented Oct 25, 2018

Hi, just leaving my notes on the setup files here. It's a ~1000 word markdown file with notes on both ubuntu and windows installations, and which documents the changes in the PR I made.
installing_wikiedudashboard.txt

@hardy1334
Copy link
Contributor

hardy1334 commented Jan 4, 2019

Hey,I'm setting up https://github.com/WikiEducationFoundation/WikiEduDashboard
repo on my system, its front end is working but its not fetching anything from database

If anyone can help it will be great!!!!

screenshot from 2019-01-04 17-47-50

@psinghal20
Copy link
Contributor Author

Hi @hardy1334, have you populated the database? If not, you can run rake dev:populate to populate the DB and run rake batch:update_constantly and rake batch:update_daily to fetch the revisions.

@hardy1334
Copy link
Contributor

Thanks @psinghal20 I will definetly do this

@hardy1334
Copy link
Contributor

@ragesoss can you send me slack invite

@ragesoss
Copy link
Member

ragesoss commented Jan 5, 2019

@hardy1334 I'll need your email address. You can reach me at [email protected]

@hardy1334
Copy link
Contributor

hardy1334 commented Jan 5, 2019

@psinghal20 In my dashboard,I'm not having tab of students option, once I login with Instructor' s account,Can you help me with that
screenshot from 2019-01-05 23-02-05

@psinghal20
Copy link
Contributor Author

@hardy1334 The editors tab is same as the students tab. You can enroll editors(students) for the course from there.

@Arpitpundir
Copy link

yarntesterror
i have done set up by script, but i can't see dashboard on localhost and on running yarn test i am getting this error stuck here need help

@gautamig54
Copy link

I am setting up a development environment for WikiEduDashboard. When I run python3 setup.py, I get an error
Mysql2::Error::ConnectionError: Access denied for user 'wiki'@'localhost' (using password: YES)

I am not able to resolve it. Can someone help me with this.
I have simply forked this repo and haven't made any extra changes. I have all dependencies Installed properly.

@psinghal20
Copy link
Contributor Author

Hi @gautamig54, looks like there is some error during user setup steps. Could you check if the user is correctly setup? You can do so by running mysql -u root -p and select * from user. If the user is correctly set up, please check if the config/database.yml has the correct credentials setup.

@gautamig54
Copy link

@psinghal20, I sorted the issue. I just had to allow certain grants explicitly for the mysql database dashboard. It worked fine post that.
Thanks!

@helenatxu
Copy link

Hello @gautamig54 could you explain how you did it? I'm have exactly the same error

@psinghal20
Copy link
Contributor Author

Hi @helenatxu, You should try giving the wiki user created grants for the wikiEducation Dashboard explicitly.

You can do this by running: GRANT ALL PRIVILEGES ON dashboard.* To 'wiki'@'localhost' IDENTIFIED BY 'wikiedu';

Assuming default user credentials

@Aeropio
Copy link
Contributor

Aeropio commented Mar 12, 2019

Hi @hardy1334, have you populated the database? If not, you can run rake dev:populate to populate the DB and run rake batch:update_constantly and rake batch:update_daily to fetch the revisions.

Hello, I got same problem, even though I ran all the rake commands mentioned, still Nothing is fetched from DB

@ragesoss
Copy link
Member

What output or error message do you get when you run rake dev:populate?

@Aeropio
Copy link
Contributor

Aeropio commented Mar 13, 2019

@ragesoss ran the rake commands successfully, I am current outreachy applicant new to open source world, can you please help me to pick up a beginner friendly task

@Manasa2850
Copy link
Contributor

I get this error when I run guard.

This is displayed in localhost:3000/

No such file or directory @ rb_sysopen - /home/manasa/WikiEduDashboard/public/assets/stylesheets/rev-manifest.json

This error occurs when the asset build process has not generated the required rev-manifest.json files, which specify the filenames of the compiled stylesheet and javascript files.

Run `gulp` or `gulp build` and make sure there are no build errors.

@Manasa2850
Copy link
Contributor

Error2

I get this when I run gulp and gulp build.

@Manasa2850
Copy link
Contributor

I was getting few errors so I created a gulpfile.js
What should I add in gulpfile.js to resolve these issues?
Please help me with these queries.

@ragesoss
Copy link
Member

@Manasa2850 hmm... I'm guessing this is because your gulp environment has not been set up to work with babel. gulpfile.babel.js is the gulpfile for the project.

What version of node are you using?

@Manasa2850
Copy link
Contributor

@ragesoss where do I create courses and add students? My dashboard just has an option for creating programs and campaigns and not courses.

@ragesoss
Copy link
Member

ragesoss commented Jan 7, 2020

@Manasa2850 'program' and 'course' mean the same thing in this app, we just use different names depending on the configuration. (And 'editor' and 'student' are also the same.)

@ragesoss
Copy link
Member

ragesoss commented Jan 7, 2020

If you switch to wiki_education: 'true' in application.yml, most things will show up as 'course' and 'student' by default.

@shruti862
Copy link
Contributor

I am unable to figure out the problem from the logs.

@shruti862
Copy link
Contributor

shruti862 commented Dec 11, 2023

Screenshot from 2023-12-11 14-56-12
@prathamVaidya @ragesoss This is the error I am encountering right now

@prathamVaidya
Copy link
Contributor

@shruti862, the error you're encountering may be due to an incomplete MySQL setup. There is a logic to create a mysql account automatically, that might have failed during the setup script.
which ubuntu version are you using?
There must be some trace of failure in the setup log.txt. can you upload your log.txt and provide a link to it.
Also are you using the latest pull? I fixed an error related to same issue few days ago.

@shruti862
Copy link
Contributor

shruti862 commented Dec 11, 2023

log.txt
This is my log file @prathamVaidya
I am using Ubuntu 22.04.3
I don't know how to create automatic mysql account

@prathamVaidya
Copy link
Contributor

Here is your error:
Building dependency tree... Reading state information... Package libmariadbclient-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: libmariadb-dev-compat libmariadb-devc
This package is not available on latest versions of ubuntu. I have fixed this issue in the script.
It looks like you might be using an older version of master.
Please confirm you are using master branch and do a git pull or sync fork (if using fork).

@shruti862
Copy link
Contributor

shruti862 commented Dec 11, 2023

I cloned the repo from the master branch to my local system

@prathamVaidya
Copy link
Contributor

can you use this command and tell what is the output:

sudo apt-get install -y libmariadb-dev

@shruti862
Copy link
Contributor

Screenshot from 2023-12-11 15-29-43

@prathamVaidya
Copy link
Contributor

Found the reason. Installation is perfect. You have not run
yarn start
After running guard run yarn start in different terminal. Then the web page should be available.

@prathamVaidya
Copy link
Contributor

Screenshot from 2023-12-11 14-56-12 @prathamVaidya @ragesoss This is the error I am encountering right now

though this is still unclear why. let me know if it works after the yarn command.

@shruti862
Copy link
Contributor

I tried yarn start after guard command ,but still getting same error
Screenshot from 2023-12-11 15-59-25

@shruti862
Copy link
Contributor

Screenshot from 2023-12-11 16-02-41
I am getting this thing while manually starting reddis server,

@prathamVaidya
Copy link
Contributor

Screenshot from 2023-12-11 16-02-41 I am getting this thing while manually starting reddis server,

That is not a problem. The redis-server is already running that's why the port is already busy.

@prathamVaidya
Copy link
Contributor

prathamVaidya commented Dec 11, 2023

I tried yarn start after guard command ,but still getting same error Screenshot from 2023-12-11 15-59-25

You can temporarily fix the issue by running these sql commands in mysql.

run sudo mysql

then enter following commands.

CREATE USER 'wiki'@'localhost' IDENTIFIED BY 'wikiedu';
GRANT ALL PRIVILEGES ON dashboard . * TO 'wiki'@'localhost';
GRANT ALL PRIVILEGES ON dashboard_testing . * TO 'wiki'@'localhost';

Try restarting guard again.
IDK, why the script failed to run those.

@shruti862
Copy link
Contributor

shruti862 commented Dec 11, 2023

@prathamVaidya
Issue resolved ,Thanks for ur help !

@kan-ish
Copy link

kan-ish commented Dec 15, 2023

@prathamVaidya I am encountering the same issue as @shruti862 here while trying to setup the project on my local. Though I am running OSX.
Screenshot 2023-12-15 at 22 28 05
Screenshot 2023-12-15 at 22 32 03
log.txt

I suspect the issue might be related to mysql setup, as there was a hiccup during the setup while populating the db. I tried running these commands as advised by you to Shruti -

You can temporarily fix the issue by running these sql commands in mysql.

run sudo mysql

then enter following commands.

CREATE USER 'wiki'@'localhost' IDENTIFIED BY 'wikiedu';
GRANT ALL PRIVILEGES ON dashboard . * TO 'wiki'@'localhost';
GRANT ALL PRIVILEGES ON dashboard_testing . * TO 'wiki'@'localhost';

Try restarting guard again. IDK, why the script failed to run those.

This didn't resolve it. Could you help me figure out what the problem might be?

@prathamVaidya
Copy link
Contributor

@prathamVaidya I am encountering the same issue as @shruti862 here while trying to setup the project on my local. Though I am running OSX.
Screenshot 2023-12-15 at 22 28 05
Screenshot 2023-12-15 at 22 32 03
log.txt

I suspect the issue might be related to mysql setup, as there was a hiccup during the setup while populating the db. I tried running these commands as advised by you to Shruti -

You can temporarily fix the issue by running these sql commands in mysql.

run sudo mysql

then enter following commands.

CREATE USER 'wiki'@'localhost' IDENTIFIED BY 'wikiedu';
GRANT ALL PRIVILEGES ON dashboard . * TO 'wiki'@'localhost';
GRANT ALL PRIVILEGES ON dashboard_testing . * TO 'wiki'@'localhost';

Try restarting guard again. IDK, why the script failed to run those.

This didn't resolve it. Could you help me figure out what the problem might be?

Logs didn't show any signs of failure. Can you confirm if you have run yarn start or build command to generate frontend build.

If yes, there must be some error message when running the guard command. Check and share that.

@kan-ish
Copy link

kan-ish commented Dec 15, 2023

I restarted everything and the issue seems to be resolved now (still don't know what the issue was). I restarted Redis, ran guard and yarn start again and the frontend did load. Although it was pretty slow (> 60 seconds). I restarted my machine and now everything seems to be running fine and as expected (seems like a machine issue but worth mentioning).

Thanks for the quick reply though!

@liaozhuzhu
Copy link

Running into 2 errors when I run python3 setup.py.

[*] Installing MariaDB-server...
Warning: mariadb 11.2.2 is already installed and up-to-date.
To reinstall 11.2.2, run:
brew reinstall mariadb
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; /bin/launchctl bootstrap gui/501 /Users/liaozhu/Library/LaunchAgents/homebrew.mxcl.mariadb.plist exited with 5.

[] Creating User for Mysql...
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
[
] Migrating databases...
rake aborted!
ActiveRecord::ConnectionNotEstablished: TLS/SSL error: No such file or directory (2)
Caused by:
Mysql2::Error::ConnectionError: TLS/SSL error: No such file or directory (2)
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
rake aborted!
ActiveRecord::ConnectionNotEstablished: TLS/SSL error: No such file or directory (2)
Caused by:
Mysql2::Error::ConnectionError: TLS/SSL error: No such file or directory (2)
Tasks: TOP => db:migrate

Log File:
log.txt

I am running MacOS and have been stuck on this issue for several hours now. Thank you

@SainiAditya1
Copy link

@prathamVaidya I am getting internal server error then done the changes suggested by you above , Then I am getting this
Screenshot from 2024-01-06 18-04-51

@prathamVaidya
Copy link
Contributor

@prathamVaidya I am getting internal server error then done the changes suggested by you above , Then I am getting this Screenshot from 2024-01-06 18-04-51

Looks like you are opening the project from PORT 8080, use PORT 3000.

in one terminal use
yarn start to start react project with live server.
and in another terminal use
guard to start ruby on rails.

In this project react application is build and then served by ruby on rails server. So you need to start both and then access the application at PORT 3000 and not 8080 (I believe its only for serving static assets and for syncing live changes).

@SainiAditya1
Copy link

I have made the above changes it still showing this
Screenshot from 2024-01-06 20-02-53

@SainiAditya1
Copy link

@prathamVaidya Please have a look

@prathamVaidya
Copy link
Contributor

Looks like some issue from backend. Please provide logs or error screenshots of the guard command.

@SainiAditya1
Copy link

Screenshot from 2024-01-07 11-03-38

@prathamVaidya
Copy link
Contributor

No errors in the SS.

  • were there any errors during installation?

@SainiAditya1
Copy link

@prathamVaidya ,Now it's working fine with database migrations bin/rails db:migrate RAILS_ENV=development . Thanks for all your suggestions .

@SainiAditya1
Copy link

Screenshot from 2024-01-07 11-48-58

@FormasitChijoh324
Copy link

Hello @prathamVaidya , @ragesoss , please i am trying to setup the project but i have difficulties migrating the database i am runing on a Mac Sonoma version 14.3 and i have Xcode 15.2 i have followed the installation process up to the point of the migrations using rake but all my attempt gives me this error
Screenshot 2024-09-14 at 11 38 36

Screenshot 2024-09-14 at 11 38 51

i have gone use this same command bin/rails db:migrate RAILS_ENV=development as above but it still does not work

Screenshot 2024-09-14 at 11 41 55

please i would appreciate any help or directions to the right resources to use, thank you

@ragesoss
Copy link
Member

Hmm... I'm not sure! I haven't seen this particular failure mode before.

I suggest going through the manual version of the setup, and report the details of any step that generates an unexpected error.

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

No branches or pull requests