-
Notifications
You must be signed in to change notification settings - Fork 124
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
vite_rails: Improve default deployment and dev enviroment support #491
Comments
Hi Brian! The guide recommends running I'm not familiar with Kamal or Devcontainers, happy to include setup guides in the docs. Instructions should be concise, following the existing style of the docs. Alternatively, we can link to other resources that go into more detail of how to setup either. |
I have not used them personally, but I believe Kamal and Dev Containers are both based on Docker. When you run # Install JavaScript dependencies
ARG NODE_VERSION=20.17.0
ARG YARN_VERSION=1.22.22
ENV PATH=/usr/local/node/bin:$PATH
RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \
/tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \
npm install -g yarn@$YARN_VERSION && \
rm -rf /tmp/node-build-master
# Install node modules
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile Likewise, it adds a Node "feature" to "features": {
"ghcr.io/devcontainers/features/node:1": {}
} The problem is that Vite is not a supported option for The Vite Ruby docs could be updated to explain this, and/or mention specifically how to update the Docker files and GitHub actions workflow after the fact. |
Second the documentation website needs a thorough review. Many sections simply state, “You can use this (link to GitHub page),” without explaining what to expect or how to configure the options correctly. This is especially problematic when certain options are incompatible with each other. Additionally, I can no longer get If you try creating a new Rails 7.2 or 8 app with: |
@planetaska I just skip javascript and then run the standard vite ruby install steps |
Is it still broken with |
Rails 7.2+ ships with features like the ability to generate a devcontainer for development, Github Action to run tests and Rails 8 will ship with Kamal configured by default for deployment.
It would be helpful if vite_rails integrated into these systems automatically or (as a fallback) documented what steps users need to take in order to work with these new defaults.
At a first pass, I ran into trouble with:
run: npm install
)There are some pointers in the existing docs, like a dependency on npx and some notes about devcontainers port forwarding, but I think it would be helpful to have very clear steps for Rails users as part of the vite_rails setup docs.
For example, I'm not sure if I should actually be running
npm install
in my Github Action or if there's a bug somewhere invite:install_dependencies
or other hooks which should automatically install the deps.The text was updated successfully, but these errors were encountered: